Skip to main content
Glama

Topos Detailed Inspection

topos_inspect_code
Read-onlyIdempotent

Inspect a code unit to retrieve per-function complexity, entropy metrics, and a quality evaluation. Ideal for detailed structural analysis beyond a simple verdict.

Instructions

Full metric breakdown for a single code unit (inline string or file).

Read-only; provide exactly one of code or filepath. Use when you need the per-function detail behind a verdict; use topos_evaluate_* when the medal alone is enough. For filepath input, language is autodetected from the extension; language only applies to inline code. Returns an InspectionResult: the lattice evaluation, a top-N function complexity table (top_n_functions, default 10), total_functions, and entropy details. The top-N cap keeps large files from blowing out agent context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYesArguments for ``topos_inspect_code``.
Behavior5/5

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

Discloses that the tool is read-only, returns an InspectionResult with specific fields (evaluation, top_n_functions, total_functions, entropy), and explains the top-N capping rationale to keep agent context lean, adding value beyond annotations.

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?

Every sentence is information-dense and purposeful, with no fluff. The description is front-loaded with purpose and immediately provides usage guidance.

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

Completeness5/5

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

Given the nested parameters and many sibling tools, the description fully covers input constraints, output structure, and behavioral rationale, making it self-contained for correct tool invocation.

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?

While the schema already covers all parameters with descriptions, the description adds crucial usage context (exactly one of code/filepath, language only for inline code, top_n_functions default and max) that enhances understanding.

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 performs a full metric breakdown for a single code unit, and distinguishes it from sibling tools by specifying when to use this one (for per-function detail) vs topos_evaluate_* (when only medal is needed).

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

Usage Guidelines5/5

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

Explicitly advises to provide exactly one of code or filepath, when to use this tool instead of alternatives, and clarifies that language is autodetected for filepath but applies only to inline code.

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/Krv-Labs/topos'

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