Skip to main content
Glama
notasandy

MCP Code Sanitizer

explain_code

Explains code step by step, identifying key concepts and gotchas, with explanations tailored to your experience level.

Instructions

Explains what code does - step by step and clearly. Args: code: Code to explain. language: Programming language. audience: Target audience level - junior, middle, or senior. Returns: JSON with step-by-step explanation, key concepts, and gotchas.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
languageNopython
audienceNojunior

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations provided, so description carries full burden. It only states it explains code and returns JSON, but does not disclose behavioral traits like read-only, performance, or limitations. For a code explanation tool, this is insufficient.

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?

Description is short and front-loaded with purpose. The parameter section is structured but could be more concise if schema had descriptions. However, given no schema descriptions, it is appropriately sized.

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

Completeness3/5

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

Tool has 3 parameters and output schema exists. Description explains return format (step-by-step explanation, key concepts, gotchas) but does not detail output schema fields. It lacks coverage of edge cases or limitations.

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?

Schema description coverage is 0%, so description adds significant value. It clearly describes each parameter: code, language (with default python), and audience (with levels junior/middle/senior). It also mentions defaults, which are not in schema descriptions.

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 it 'explains what code does - step by step and clearly.' The verb 'explain' matches the tool name, and the resource is code. It distinguishes from siblings like 'analyze_code' by emphasizing step-by-step and clear explanation.

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

Usage Guidelines3/5

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

No explicit guidance on when to use this vs alternatives. The description implies a teaching context, but does not provide exclusions or when-not-to-use. Sibling tools like 'analyze_code' or 'compare_code' might overlap, but no differentiation is given.

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/notasandy/mcp-code-sanitizer'

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