Skip to main content
Glama
minuetai
by minuetai

get_network_stats

Retrieve aggregate statistics from the Minuet relationship graph, including totals for relationships, agents, and top relationship types.

Instructions

Return aggregate statistics about the Minuet relationship graph.

Returns totals for relationships, agents, named agents, verified vs inferred status, and the top relationship types.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for get_network_stats tool. Fetches clusters and relationships from the Minuet API, computes aggregate statistics (status counts, relationship type counts), and merges them with cluster stats.
    @mcp.tool()
    async def get_network_stats() -> dict[str, Any]:
        """Return aggregate statistics about the Minuet relationship graph.
    
        Returns totals for relationships, agents, named agents, verified vs
        inferred status, and the top relationship types.
        """
        from collections import Counter
    
        async with MinuetClient() as client:
            clusters = await client.get_clusters()
            rels = await client.list_relationships()
    
        relationships = rels.get("relationships", [])
        status_counts: Counter[str] = Counter(r.get("status", "") for r in relationships)
        type_counts: Counter[str] = Counter(
            r.get("relationship_type", "") for r in relationships
        )
    
        stats = dict(clusters.get("stats", {}))
        stats["by_status"] = dict(status_counts)
        stats["by_relationship_type"] = dict(type_counts)
        return stats
  • Registration of get_network_stats as an MCP tool via the @mcp.tool() decorator on FastMCP instance.
    @mcp.tool()
    async def get_network_stats() -> dict[str, Any]:
  • Helper method on MinuetClient that calls the /api/relationships/clusters endpoint used by get_network_stats.
    async def get_clusters(self) -> dict[str, Any]:
        return await self._get("/api/relationships/clusters")
  • Helper method on MinuetClient that calls the /api/relationships endpoint used by get_network_stats.
    async def list_relationships(self) -> dict[str, Any]:
        return await self._get("/api/relationships")
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the return statistics in detail, which is sufficient for a read-only aggregate tool. No side effects or requirements are noted, but none are expected.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two sentences clearly stating the purpose and return content. However, it could be slightly more structured (e.g., bullet points) but is still effective and without waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters and an output schema, the description is complete enough for a simple stats tool. It covers what is returned but could mention scope (e.g., global vs per workspace) to avoid ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, so the description does not need to add parameter semantics. The input schema is empty and fully described by the absence of parameters, meeting the baseline for no-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns aggregate statistics about the Minuet relationship graph, specifying the types of totals (relationships, agents, named agents, verified/inferred status, top types). This distinguishes it from sibling tools like get_agent or get_relationship_graph which focus on individual entities or graphs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool over alternatives. While the purpose is clear, it lacks guidance on context (e.g., when aggregate stats are needed vs. detailed relationships). The agent must infer from the purpose alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/minuetai/minuet-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server