Skip to content

Commit 9e7dad6

Browse files
Zhe YuDavidyz
authored andcommitted
refactor(cli): Refactor prompt descriptions for ls and query tools
1 parent 62f6454 commit 9e7dad6

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

src/vectorcode/mcp_main.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,18 +186,17 @@ async def mcp_server():
186186
mcp.add_tool(
187187
fn=list_collections,
188188
name="ls",
189-
description="List all projects indexed by VectorCode. Call this before making queries.",
189+
description="\n".join(
190+
prompt_by_categories["ls"] + prompt_by_categories["general"]
191+
),
190192
)
191193

192194
mcp.add_tool(
193195
fn=query_tool,
194196
name="query",
195-
description=f"""
196-
Use VectorCode to perform vector similarity search on repositories and return a list of relevant file paths and contents.
197-
Make sure `project_root` is one of the values from the `ls` tool.
198-
Unless the user requested otherwise, start your retrievals by {mcp_config.n_results} files.
199-
The result contains the relative paths for the files and their corresponding contents.
200-
""",
197+
description="\n".join(
198+
prompt_by_categories["query"] + prompt_by_categories["general"]
199+
),
201200
)
202201

203202
return mcp

0 commit comments

Comments
 (0)