get_agent_relationships
List incoming, outgoing, or both relationships for a specific agent in the ERC-8004 relationship graph.
Instructions
List relationships for a specific agent.
Args:
agent_id: Canonical chainId:agentId identifier.
direction: One of incoming, outgoing, or both (default).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | ||
| direction | No | both |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/minuet_mcp/server.py:57-68 (handler)The MCP tool handler for get_agent_relationships. Decorated with @mcp.tool(), it accepts an agent_id and an optional direction parameter, creates a MinuetClient, and delegates to the client method.
@mcp.tool() async def get_agent_relationships( agent_id: str, direction: str = "both" ) -> dict[str, Any]: """List relationships for a specific agent. Args: agent_id: Canonical `chainId:agentId` identifier. direction: One of `incoming`, `outgoing`, or `both` (default). """ async with MinuetClient() as client: return await client.get_agent_relationships(agent_id, direction=direction) - src/minuet_mcp/client.py:89-95 (helper)The MinuetClient helper method that performs the actual HTTP GET request to the Minuet API endpoint /api/agent/{agent_id}/relationships with the direction query parameter.
async def get_agent_relationships( self, agent_id: str, direction: str = "both" ) -> dict[str, Any]: return await self._get( f"/api/agent/{agent_id}/relationships", params={"direction": direction}, ) - src/minuet_mcp/server.py:57-68 (registration)Registration of get_agent_relationships as an MCP tool via the @mcp.tool() decorator on the FastMCP instance defined at line 16 of server.py.
@mcp.tool() async def get_agent_relationships( agent_id: str, direction: str = "both" ) -> dict[str, Any]: """List relationships for a specific agent. Args: agent_id: Canonical `chainId:agentId` identifier. direction: One of `incoming`, `outgoing`, or `both` (default). """ async with MinuetClient() as client: return await client.get_agent_relationships(agent_id, direction=direction) - src/minuet_mcp/server.py:65-66 (schema)Input schema/parameters for the tool: agent_id (string, required) and direction (string, default 'both', accepting 'incoming', 'outgoing', or 'both').
direction: One of `incoming`, `outgoing`, or `both` (default). """