Skip to main content
Glama
windhxy

codesafe-audit-mcp

by windhxy

codesafe_submit_audit

Submit audit verdicts to the CodeSafe platform to update defect classifications, enabling UI markers and PDF exports to reflect confirmed outcomes. Use dry-run preview before committing changes.

Instructions

Write audit verdicts back to the platform (POST /codesafeapi/result/audit), so the Web UI shows 误报/确认 markers and PDF exports include them.

audits: list of {bugId OR pkResbug, auditResult OR verdict, auditMemo?}.

  • bugId: the 32-char hash (from codesafe_list_bugs). A numeric pkResbug may be passed as bugId — it is auto-routed to the pkResbug field.

  • pkResbug: the numeric defect id (alternative to bugId).

  • auditResult: platform code directly (5=是问题, 6=不是问题/误报, 9=遗留).

  • verdict: real/false_positive/needs_review (mapped to 5/6/9). dry_run (default true): preview the payload without writing. To commit, CODESAFE_ENABLE_WRITE must be true and confirm_write must be explicitly true.

⚠️ This is the only tool that mutates the platform. Prefer dry_run first, and write in small batches. Each write is verified — if the bug's auditState does not actually change (e.g. ID not resolved), the tool raises instead of silently leaving only a comment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
auditsYes
dry_runNo
task_idYes
confirm_writeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, so the description fully discloses the mutation behavior, dry-run default, environment variable requirement, confirmation flag, and the verification that raises if no state change occurs. This is rich behavioral context beyond any structured fields.

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?

The description is well-structured with a clear purpose statement, a parameter breakdown, and a warning section. It is dense but not bloated; every sentence adds necessary information.

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?

For a 4-parameter mutation tool with no annotations and no schema descriptions, this description covers purpose, all parameter semantics, safety behavior, and verification. Since an output schema is present, return values need no explanation, making the description contextually complete.

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?

The schema has 0% description coverage, so the description compensates thoroughly by explaining the audits array structure, bugId/pkResbug alternatives, auditResult/verdict mapping, and dry_run/confirm_write semantics. However, task_id is not explained beyond being required, leaving a small gap.

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 clear verb and object: 'Write audit verdicts back to the platform', and specifies the exact endpoint and UI effect. It explicitly distinguishes itself from sibling tools by stating it is the only tool that mutates the platform.

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?

The description gives clear usage context: it is the only mutation tool, so it should be used for persisting verdicts while siblings are read-only. It also advises to prefer dry_run first and write in small batches, providing explicit when-to-use guidance.

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/windhxy/codesafe-audit-mcp'

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