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
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | EN source code describing the system | |
| invariants | No | Invariants to check against the structure | |
| detect_antipatterns | No | Antipatterns to detect in the structure |
Implementation Reference
- src/index.ts:47-72 (handler)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, }; } );