better copilot integration
This commit is contained in:
@@ -69,6 +69,15 @@ When resource attachment is unavailable in the active session, use ResourcesAsTo
|
|||||||
4. `get_pattern_by_id`
|
4. `get_pattern_by_id`
|
||||||
5. `get_skill_document_by_id`
|
5. `get_skill_document_by_id`
|
||||||
|
|
||||||
|
Canonical naming policy:
|
||||||
|
|
||||||
|
1. Prefer the five canonical tool names above in prompts and instructions.
|
||||||
|
2. For compatibility with clients that emit `catalog_*` naming, the server also exposes:
|
||||||
|
- `catalog_search_patterns`
|
||||||
|
- `catalog_get_pattern_by_id`
|
||||||
|
- `catalog_get_skill_document_by_id`
|
||||||
|
3. Canonical and compatibility alias tools return equivalent payloads for the same input.
|
||||||
|
|
||||||
The first two are generated from the canonical resource surface and should be preferred in tool-only clients.
|
The first two are generated from the canonical resource surface and should be preferred in tool-only clients.
|
||||||
|
|
||||||
These should stay read-only, minimal, and schema-aligned with catalog resources.
|
These should stay read-only, minimal, and schema-aligned with catalog resources.
|
||||||
|
|||||||
@@ -204,6 +204,14 @@ Preferred tool fallback order:
|
|||||||
4. `get_pattern_by_id`
|
4. `get_pattern_by_id`
|
||||||
5. `get_skill_document_by_id`
|
5. `get_skill_document_by_id`
|
||||||
|
|
||||||
|
Compatibility aliases for clients that use `catalog_*` naming are also available:
|
||||||
|
|
||||||
|
1. `catalog_search_patterns`
|
||||||
|
2. `catalog_get_pattern_by_id`
|
||||||
|
3. `catalog_get_skill_document_by_id`
|
||||||
|
|
||||||
|
Use canonical names first; aliases exist only to preserve interoperability when a client emits non-canonical names.
|
||||||
|
|
||||||
If confidence is low after discovery, ask one clarifying question before loading more context.
|
If confidence is low after discovery, ask one clarifying question before loading more context.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -185,4 +185,32 @@ def get_skill_document_by_id(skill_id: str) -> dict[str, Any]:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@mcp.tool
|
||||||
|
def catalog_search_patterns(
|
||||||
|
query: str = "",
|
||||||
|
tags: list[str] | None = None,
|
||||||
|
skip: int = 0,
|
||||||
|
limit: int = 20,
|
||||||
|
) -> dict[str, Any]:
|
||||||
|
"""Compatibility alias for clients expecting catalog_* tool naming."""
|
||||||
|
return search_patterns(
|
||||||
|
query=query,
|
||||||
|
tags=tags,
|
||||||
|
skip=skip,
|
||||||
|
limit=limit,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@mcp.tool
|
||||||
|
def catalog_get_pattern_by_id(id: str) -> dict[str, Any]:
|
||||||
|
"""Compatibility alias for clients expecting catalog_* tool naming."""
|
||||||
|
return get_pattern_by_id(id)
|
||||||
|
|
||||||
|
|
||||||
|
@mcp.tool
|
||||||
|
def catalog_get_skill_document_by_id(skill_id: str) -> dict[str, Any]:
|
||||||
|
"""Compatibility alias for clients expecting catalog_* tool naming."""
|
||||||
|
return get_skill_document_by_id(skill_id)
|
||||||
|
|
||||||
|
|
||||||
_install_tool_fallback_transforms()
|
_install_tool_fallback_transforms()
|
||||||
|
|||||||
Reference in New Issue
Block a user