Skip to content

Commit 96d86ee

Browse files
authored
fix: update installation prompt for manifest generation (#102)
1 parent 4506478 commit 96d86ee

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

scripts/get_manifest.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ def _extract_installations(self, repo_url: str, readme_content: str) -> Dict:
519519
"""Extract installations information using LLM."""
520520
schema = {
521521
"name": "extract_installations",
522-
"description": "Extract installations information",
522+
"description": "Extract installation information for different clients(Claude Desktop/Cursor/Windsurf/VSCode and so on) from content inside of <README> tag and strictly follow the rules",
523523
"required": ["installations"],
524524
"parameters": {
525525
"type": "object",
@@ -547,7 +547,7 @@ def _extract_installations(self, repo_url: str, readme_content: str) -> Dict:
547547
"env": {
548548
"type": "object",
549549
"description": "Environment variables",
550-
"additionalProperties": {"type": "string"}
550+
"additionalProperties": {"type": "string"},
551551
},
552552
"description": {
553553
"type": "string",
@@ -564,9 +564,16 @@ def _extract_installations(self, repo_url: str, readme_content: str) -> Dict:
564564
repo_url=repo_url,
565565
readme_content=readme_content,
566566
schema=schema,
567-
prompt=("""Extract the installation methods for this server.
568-
The installation methods should be a list of methods to install and run this server.
569-
It can often be found in the usage section of the README file.
567+
prompt=(
568+
"""Extract the installation information of different clients for this server.
569+
The installations should be a list of methods to install and run this server.
570+
It can often be found in the usage section with **valid json format** of the README file.
571+
<RULES>
572+
1. Skip any method using '@smithery/cli' or similar Smithery CLI tools.
573+
2. Only focus on json block and exclude other blocks like bash/sh/code
574+
3. The command should be one of the following: npx, uvx, node, docker, python, bunx, deno. Don't include other commands
575+
4. If multiple installations exist, exclude local/deployment/debug configuration, only keep uvx, npx, docker
576+
</RULES>
570577
<Example>
571578
<README> Docker
572579
{
@@ -602,7 +609,7 @@ def _extract_installations(self, repo_url: str, readme_content: str) -> Dict:
602609
}
603610
}
604611
}
605-
<README/>
612+
</README>
606613
From the example README, you should get:
607614
{
608615
"installations": [
@@ -634,7 +641,7 @@ def _extract_installations(self, repo_url: str, readme_content: str) -> Dict:
634641
}
635642
]
636643
}
637-
<README/>
644+
</Example>
638645
Note that installation type should be one of the following: npm, python, docker, cli, uvx, custom.
639646
For placeholder variables, use ${...} to indicate the variable.
640647
If no installations are provided, return an empty array. """)

0 commit comments

Comments
 (0)