Skip to main content
Glama

Topos Code Evaluation

topos_evaluate_code
Read-onlyIdempotent

Evaluate raw source code on the SIMPLE, COMPOSABLE, and SECURE quality lattice using graph-based analysis. Returns a verdict from SLOP to IDEAL and per-generator scores.

Instructions

Score a raw code string on the SIMPLE / COMPOSABLE / SECURE quality lattice (read-only; never writes or runs the code).

Use for a snippet not yet on disk. Only SIMPLE and SECURE are reachable here (scored from the source's CFG/CPG); COMPOSABLE needs a module dependency graph, so for it use topos_evaluate_file with gitnexus_dir, or topos_evaluate_project for a whole tree. Returns an EvaluationResult: the lattice verdict (SLOP…IDEAL), per-generator scores, and a next-step agent contract.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYesArguments for ``topos_evaluate_code``.
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false. Description reinforces 'never writes or runs the code' and adds that only SIMPLE and SECURE are reachable here, which is critical behavioral context beyond annotations. No contradictions.

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

Conciseness4/5

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

Compact single paragraph with clear front-loading of purpose. No wasted words, though slightly more structure (e.g., bullet points) could improve scannability.

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

Completeness4/5

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

Covers what tool does, when to use, what it doesn't do, and mentions return type (EvaluationResult). No output schema, so description reasonably fills gap. Sufficient for an experienced agent.

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 baseline is 3. Description does not add param-level detail beyond schema but does clarify the tool's overall semantics (COMPOSABLE not reachable). Appropriate score.

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?

Explicitly states 'score a raw code string on the SIMPLE/COMPOSABLE/SECURE quality lattice' and distinguishes from sibling tools like topos_evaluate_file and topos_evaluate_project, which handle files or projects. Understood at a glance.

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?

States 'use for a snippet not yet on disk' and explicitly explains when to prefer alternatives: 'for COMPOSABLE use topos_evaluate_file or topos_evaluate_project.' Clear decision support.

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