Skip to content

Commit 9e569d8

Browse files
authored
Merge pull request #32 from x0cipher/fix/registry-server-optional-description
fix: handle optional 'description' in example registry server
2 parents d56e049 + 8f53c63 commit 9e569d8

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

conformance/examples/ai-catalog.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434
"type": "application/ai-catalog+json",
3535
"url": "https://acme.com/catalogs/engineering.json",
3636
"description": "Nested catalog containing CI/CD and internal deployment agents."
37+
},
38+
{
39+
"identifier": "urn:air:acme.com:tool:unit-converter",
40+
"displayName": "Unit Converter",
41+
"type": "application/mcp-server-card+json",
42+
"url": "https://api.acme.com/mcp/unit-converter.json"
3743
}
3844
]
3945
}

conformance/examples/registry-server.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@
4545
"type": "application/ai-catalog+json",
4646
"url": "https://acme.com/catalogs/engineering.json",
4747
"description": "Nested catalog containing CI/CD and internal deployment agents."
48+
},
49+
{
50+
"identifier": "urn:air:acme.com:tool:unit-converter",
51+
"displayName": "Unit Converter",
52+
"type": "application/mcp-server-card+json",
53+
"url": "https://api.acme.com/mcp/unit-converter.json"
4854
}
4955
]
5056

@@ -113,7 +119,7 @@ def do_POST(self):
113119
matched = False
114120

115121
# Match text against keywords in display name, description, or representative queries
116-
if query_text in entry["displayName"].lower() or query_text in entry["description"].lower():
122+
if query_text in entry["displayName"].lower() or query_text in entry.get("description", "").lower():
117123
score += 30
118124
matched = True
119125

0 commit comments

Comments
 (0)