Skip to main content
Glama

get_statistics

Retrieve comprehensive statistics about all tiling trees to analyze research organization and identify patterns in hierarchical knowledge structures.

Instructions

Get overall statistics about all tiling trees

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'get_statistics': calls treeManager.getStatistics() and returns the result as JSON text content.
    case "get_statistics": {
      const result = treeManager.getStatistics();
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • src/index.ts:336-342 (registration)
    Registration of 'get_statistics' tool in the TOOLS array, including name, description, and empty input schema.
      name: "get_statistics",
      description: "Get overall statistics about all tiling trees",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Core implementation of getStatistics() method in ResearchTreeManager class that computes and returns statistics on trees and tiles.
    getStatistics(): any {
      const allTiles = Array.from(this.tiles.values());
      const allTrees = Array.from(this.trees.values());
      const leaves = allTiles.filter((t) => t.isLeaf);
      const splits = allTiles.filter((t) => t.childrenIds.length > 0);
    
      return {
        totalTrees: allTrees.length,
        totalTiles: allTiles.length,
        leafTiles: leaves.length,
        splits: splits.length,
        validatedSplits: splits.filter((t) => t.isMECE === true).length,
        evaluatedLeaves: leaves.filter((t) => t.evaluation).length,
        commonSplitAttributes: this.getCommonSplitAttributes(),
      };
    }
  • Helper method called by getStatistics() to compute the most common split attributes used across all tiles.
    private getCommonSplitAttributes(): Array<{ attribute: string; count: number }> {
      const attributeCounts = new Map<string, number>();
    
      for (const tile of this.tiles.values()) {
        if (tile.splitAttribute) {
          attributeCounts.set(
            tile.splitAttribute,
            (attributeCounts.get(tile.splitAttribute) || 0) + 1
          );
        }
      }
    
      return Array.from(attributeCounts.entries())
        .map(([attribute, count]) => ({ attribute, count }))
        .sort((a, b) => b.count - a.count)
        .slice(0, 10);
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states what the tool does but doesn't describe important behavioral aspects: whether this is a read-only operation, what format the statistics are returned in, whether there are rate limits, or what specific statistics are included. The description is minimal and lacks operational context.

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

Conciseness5/5

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

The description is perfectly concise - a single sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded with the essential information and contains zero wasted text. This is an excellent example of efficient documentation for a simple tool.

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

Completeness2/5

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

Given the tool has no annotations and no output schema, the description is insufficiently complete. For a statistics retrieval tool, the description should ideally indicate what statistics are returned, the format of the response, or at minimum acknowledge that this provides aggregated data. The current description leaves too many questions unanswered about what 'overall statistics' actually means.

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 zero parameters with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't discuss parameters since none exist, and it correctly focuses on the tool's purpose rather than attempting to document non-existent inputs.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('overall statistics about all tiling trees'). It distinguishes itself from siblings by focusing on aggregated statistics rather than individual tree operations or tile-level details. However, it doesn't explicitly contrast with similar statistical tools like 'get_coverage_analysis' or 'get_top_leaves'.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_coverage_analysis', 'get_top_leaves', and 'get_trees' that might provide related data, there's no indication of when this aggregated statistics tool is preferred over those more specific tools. Usage context is implied but not stated.

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/k-chrispens/tiling-trees-mcp'

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