Skip to main content
Glama

analyze_system

Analyze system structure using graph theory to identify topology, bottlenecks, critical paths, and verify invariants from EN syntax descriptions.

Instructions

Structural signal. You describe the system, the tool computes structural facts. All computation is deterministic — no AI inside. EN syntax: subject do: action needs: inputs yields: outputs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesEN source code describing the system
invariantsNoInvariants to check against the structure
detect_antipatternsNoAntipatterns to detect in the structure

Implementation Reference

  • The 'analyze_system' tool definition and handler implementation in 'src/index.ts'. It uses a helper function 'callApi' to communicate with an external API.
    server.tool(
      "analyze_system",
      "Structural signal. You describe the system, the tool computes structural facts. All computation is deterministic — no AI inside. EN syntax: subject do: action needs: inputs yields: outputs.",
      {
        source: z.string().describe("EN source code describing the system"),
        invariants: z
          .string()
          .optional()
          .describe("Invariants to check against the structure"),
        detect_antipatterns: z
          .string()
          .optional()
          .describe("Antipatterns to detect in the structure"),
      },
      async ({ source, invariants, detect_antipatterns }) => {
        const result = await callApi("analyze_system", {
          source,
          invariants,
          detect_antipatterns,
        });
        return {
          content: [{ type: "text" as const, text: result.text }],
          isError: result.isError,
        };
      }
    );
Behavior2/5

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

With no annotations provided, the description carries full burden. It states computation is 'deterministic' and 'no AI inside', which adds some behavioral context. However, it doesn't disclose critical traits like whether this is a read-only operation, what happens with invalid inputs, performance characteristics, or error handling. The description is insufficient for a tool with 3 parameters and no output schema.

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

Conciseness3/5

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

The description is relatively concise but poorly structured. The 'EN syntax' note is confusing and doesn't add value. The sentences are somewhat disjointed ('Structural signal.' stands alone awkwardly). While brief, the phrasing could be more coherent and front-loaded with clearer purpose.

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 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'structural facts' are computed, what format they're returned in, or how the parameters interact. For a tool that analyzes systems with multiple configuration options, more context about the analysis scope and results is needed.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no specific parameter information beyond what's in the schema. It mentions 'inputs' generically but doesn't clarify the meaning or relationships between 'source', 'invariants', and 'detect_antipatterns' parameters.

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

Purpose3/5

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

The description states the tool 'computes structural facts' from a system description, which gives a vague purpose. It mentions 'structural signal' and 'deterministic computation' but doesn't clearly specify what kind of facts or what 'structural' means in this context. It distinguishes from siblings by mentioning 'no AI inside', but the core function remains ambiguous.

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 like 'categorize', 'detail', or 'extract' from the sibling list. It mentions 'EN syntax' but doesn't explain when this tool is appropriate or what problems it solves compared to other tools.

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/dushyant30suthar/endiagram-mcp'

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