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,
        };
      }
    );

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