MCP server for the agents built using Copilot studio
Single-tool server with a moderately detailed tool definition. The `query_agent` tool has a clear description, proper input parameters with types and descriptions, and documented output structure via TypedDict. However, the tool lacks output schema documentation in the MCP definition itself, error handling guidance is minimal, and descriptions could be more precise about recovery paths. The tool name is generic (verb_noun is present but 'query_agent' is vague about what agent or domain). Parameter descriptions are adequate but lack examples of conversation flow or constraints. No input validation constraints (enums, min/max) are visible. The typing is sound (Pydantic Field usage, TypedDict for responses), but the response structure, while typed, is not exposed as a JSON Schema in the tool definition, LLMs cannot see the output shape declaratively.
use to query the agent: Copilot Agent
Tool name 'query_agent' is generic and domain-agnostic. Does not indicate the agent is a Copilot Studio bot, the domain (e.g., copilot_studio_query), or the expected action beyond 'query'. LLMs conflate similar 'query_*' patterns across tools.
Output schema is NOT documented in the MCP tool definition. The TypedDict (ToolSuccessResponse, ToolErrorResponse) exists in Python code but is not exposed as a JSON Schema for the tool's return value. LLMs cannot see that the response includes 'status', 'message', 'conversation_id', 'watermark' without reading the source code. Pattern demands: 'Document the output schema. LLMs need to know what fields to expect.'
Error handling lacks recovery guidance. The ToolErrorResponse returns a string message but does not guide the LLM on what to do next (retry, ask user, check logs, etc.). Example: 'Error querying Copilot Studio agent: {exception}' is opaque. Should be: 'Error: [reason]. [Next step: check server logs, retry with different query, or contact support].'
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 55 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 46 | - | v1 |
No input validation constraints visible. Parameters 'query', 'conversation_id', 'watermark' lack min/max length, regex patterns, or enum constraints. 'query' could be empty; no length bounds prevent absurdly large payloads. Conversely, 'conversation_id' and 'watermark' are optional but documentation does not clarify that BOTH or NEITHER should be passed together for coherent conversation state.
Parameter descriptions lack dependency hints. The docstring mentions 'Always use conversation_id and watermark from previous responses when available' but this is in the tool docstring, not in the parameter descriptions where LLMs expect constraints. The parameters themselves lack guidance on: (a) both are required together, (b) passing them enables conversation context, (c) omitting them starts a new conversation.
Tool does not support pagination or result limiting. If the agent response is large or multi-turn, there is no mechanism to request partial results, paginate, or enforce a token/character budget. Unbounded responses risk exhausting context windows. Pattern: 'Tools returning lists should accept page/offset and limit parameters.'
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) are declared. The tool is read-only (marked as Risk: READ_ONLY in the prompt), but this is not exposed in the tool definition where MCP clients can see it. The idempotent property is unclear: re-querying the same conversation_id + watermark should be idempotent, but this is not declared.