Skip to main content
Glama
MaaBlock
by MaaBlock

audit_code_defenses

Audit source code for complex control flow and unhandled exception risks by analyzing cyclomatic complexity, branch depth, and exception vectors.

Instructions

Audits AST cyclomatic complexity, branch depth, and detects unhandled exception vectors in source code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe source code to inspect
languageNoProgramming languagepython

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the burden of disclosure. It accurately conveys the static-analysis nature (auditing and detecting) and the specific analysis dimensions. However, it does not explicitly state that the tool is non-mutating, whether it accesses external resources, or what the output format is. 'Audit' strongly implies read-only, so this is adequate but not rich.

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?

A single, tight sentence that front-loads the primary action and lists concrete audit dimensions. There is no redundancy, and every clause adds specific value.

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?

For a simple two-parameter tool, the description is reasonably complete. However, with no output schema and no annotations, it does not describe what the agent should expect as a return value, how results are structured, or whether certain languages are unsupported. This leaves an agent to discover behavior at runtime.

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 both parameters are already documented ('The source code to inspect' and 'Programming language'). The description adds little beyond the schema, though it gives context for why language matters (AST parsing). Baseline 3 is appropriate for high coverage.

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 opens with a specific verb ('Audits') and clearly identifies the resource (source code) and the exact dimensions being analyzed (AST cyclomatic complexity, branch depth, unhandled exception vectors). It is easily distinguishable from sibling tools like generate_edge_tests and get_paywall_status.

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?

The description implies usage when code quality and exception-safety analysis is needed, but it does not explicitly state when to use this tool versus alternatives, nor does it provide exclusion criteria or prerequisites. No when-not guidance is present.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/MaaBlock/autotest-mcp'

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