Skip to main content
Glama
EthYusuf

shipsafe-mcp

Official
by EthYusuf

scan_snippet

Read-onlyIdempotent

Scan a code snippet for security issues before saving it to disk. Ideal for auth, payment, database, file/URL handling, and AI-calling code.

Instructions

Check a piece of code before writing it to disk (no project needed).

Use it for auth, payment, database, file/URL handling and AI-calling code.

Args: code: Source code to check. filename: Realistic path; it drives language and context detection (e.g. app/api/users/route.ts, components/Form.tsx, supabase/migrations/001.sql, app.py). runtime: Where the code runs. "client" = shipped to browsers/apps; "auto" guesses from filename/directives.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
runtimeNoauto
filenameNosnippet.ts

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is covered. The description adds genuinely useful behavioral context: filename 'drives language and context detection', and runtime 'auto' guesses from filename/directives. No contradiction with 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?

The description is front-loaded with the purpose, then uses a clean Args structure. Every sentence earns its place, and the filename examples are compact yet illustrative.

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 snippet-checking tool with an output schema and read-only annotations, the description covers invocation context fully: what input to provide, how filename affects behavior, and how runtime is determined. Nothing essential is missing for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description fully compensates. It explains code, gives filename semantics with realistic examples, and clarifies runtime values ('client' = shipped to browsers/apps; 'auto' guesses). The only minor gap is not explicitly defining 'server', but it is inferable from the enum and the contrast with 'client'.

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 and resource: 'Check a piece of code before writing it to disk'. It also clarifies scope with '(no project needed)' and lists concrete use cases (auth, payment, database, file/URL handling, AI-calling code), which distinguishes it from the sibling scan_project.

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

Usage Guidelines4/5

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

The description gives clear positive guidance on when to use the tool ('Use it for auth, payment, database, file/URL handling and AI-calling code') and states it needs no project. It does not explicitly name scan_project as the alternative or provide an exclusion condition, so it stops short of a 5.

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