A TypeScript implementation combining A2A (Agent-to-Agent) protocol with MCP (Model Context Protocol) servers. Includes weather agent for Kalimantan Timur region and client tools for agent discovery, health checking, and multi-turn message routing.
The server defines 4 tools for agent-to-agent communication and weather lookup. Tools have descriptions and input schemas are partially defined via Zod, but critical quality gaps emerge: (1) Tool names lack action verbs, 'discoveryAgents' should be 'list_agents' or 'get_agents'; 'sendToAgent' is acceptable but 'checkAgentHealth' is vague (check what? status? availability?); (2) Parameter descriptions exist but are superficial, 'Agent names available on register' does not explain the field's purpose or constraints; (3) Output schemas are NOT documented anywhere, LLMs cannot predict response structures for composition; (4) Error handling returns generic {success, error} tuples without recovery guidance; (5) The sendToAgent tool is WRITE-class but lacks confirmation/dry-run support per pattern:confirmation-request. Tool definitions appear in genkitA2aTools.ts via ai.defineTool(), which is visible, but the underlying MCP server registration (if any) is not shown, inferred presence caps tool scores at 50. Overall composition is weak: discoveryAgents and checkAgentHealth are discovery tools that should guide which agent to sendToAgent, but response schemas are invisible, breaking the chain.
Check health status of registered agents if agent is online or offline
Discovery available remote/server agents from register.
Send message or task to specific remote/server agent
information weather in Kalimantan Timur (kaltim)
Tool names lack action verbs. 'discoveryAgents' should be 'list_agents' or 'discover_agents' (start with lowercase verb). 'checkAgentHealth' is vague, does it verify connectivity, capability, status, or liveness? Rename to 'check_agent_status' or 'get_agent_health'. This violates the baseline that 90% of production tools start with an action verb.
Output schemas are not documented. discoveryAgents returns {success: bool, data?: AgentInfo[], error?: string} but the structure of AgentInfo is inferred from TypeScript interfaces (id, name, skills, description, url, create_at), not formalized in the MCP schema. checkAgentHealth returns {success, health: AgentHealth[], totalAgentServer, error} and sendToAgent returns {success, result: EventKind[], error}, all opaque to the LLM. Per pattern:tool, LLMs need documented return types to plan downstream tool calls. This prevents proper tool composition.
Inferred effective spec: 2026-07-28+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 34 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 41 | - | v1 |
Parameter descriptions are generic and lack constraints. 'Agent names available on register' does not explain when/why to pass this vs omit it. 'Max agents to check on register' lacks a min/max range (limits defaults to 10, but what is max?). 'The URL of the target agent server/remote' does not specify format (http/https required?). Per pattern:constrained-input and review:param-validation-rules, descriptions must include format, range, and allowed values.
sendToAgent is a WRITE tool (modifies remote agent state) but lacks idempotence or confirmation support. Per pattern:confirmation-request and pattern:idempotent-operation, agents should be able to dry-run or confirm before executing irreversible operations. No dry_run or confirm parameter is provided. If an agent retries a failed send, the message may be duplicated on the remote agent.
Error handling provides no recovery guidance. All tools return {success: false, error: string} with generic catch-all messages like 'Unknown error in discoveryAgents'. Per pattern:recovery-guide, errors must tell the LLM what to do next. E.g., 'Agent register unreachable (http://... not responding). Verify the AGENT_REGISTER_URL environment variable and retry.' Rather than 'Agent resgister is empty' [sic], say 'No agents registered. Register an agent via POST /agents on the register API.'
Tool definitions inferred from Genkit ai.defineTool(), not explicit MCP tool registration visible in source. The code shows genkitA2aTools.ts defining tools via @genkit-ai/google-genai and @modelcontextprotocol/sdk, but the actual MCP server entrypoint (src/mcp-ts/serverWeather.ts) and MCP resource/tool registration are not shown. Per HARD SCORING RULE 4, inferred tool definitions cap per-tool score at 50.
discoveryAgents and checkAgentHealth lack output pagination. discoveryAgents returns ALL registered agents, and checkAgentHealth returns results for all agents (limited by the 'limits' param). Per pattern:paginated-result, large result sets must support pagination. Even a 'next_cursor' or 'has_more' flag would help.
weatherKaltim parameter 'city' is a free-form string with no enum or validation. The description says 'Name city in Kaliamantan Timur' but does not list valid cities or a constraint pattern. LLMs may hallucinate city names. Per pattern:constrained-input, either provide an enum of valid cities or a regex pattern.