Skip to main content
Glama
GigantesHJI

securedact-mcp

create_safe_copy

Sanitize text using a local policy and write the approved result to a new file in the Safe Copies directory for storage or handoff.

Instructions

Sanitize text locally and write the approved result to a new file in the Safe Copies directory.

Use this when you need a sanitized on-disk copy (for storage, handoff, or archival) rather than an in-memory sanitized string. For the sanitized text only, use prepare_for_external_ai; for inspection-only use analyze_text; for reversing a prior session use restore_text.

Side effects: a new file is written to the directory set by SECUREDACT_SAFE_COPY_DIR. The supplied 'content' is not modified and no existing file is overwritten. The filename must be a bare '.txt' or '.md' basename (no path separators or directory traversal). The operation blocks and reports 'blocked' if the directory is unconfigured, the filename is invalid, or policy blocks the content.

Returns a JSON object with 'status' ('ok' or 'blocked'), 'filename', and 'counts'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
policyNoNamed redaction policy applied before writing. Defaults to 'strict_external_ai'. An unknown name returns a policy_not_found error.strict_external_ai
contentYesText to sanitize locally and write to disk. Processed on this machine; never transmitted.
filenameYesBare target filename (no directory components) ending in '.txt' or '.md'. The file is created inside the configured Safe Copies directory; an existing file is never overwritten.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.2
    • addedInput schema / properties / content / description
      Added value: +"Text to sanitize locally and write to disk. Processed on this machine; never transmitted."
    • addedInput schema / properties / filename / description
      Added value: +"Bare target filename (no directory components) ending in '.txt' or '.md'. The file is created inside the configured Safe Copies directory; an existing file is never overwritten."
    • addedInput schema / properties / policy / description
      Added value: +"Named redaction policy applied before writing. Defaults to 'strict_external_ai'. An unknown name returns a policy_not_found error."
  2. Changed1 schema field changedv0.2.0
    • changedInput schema / properties / policy / default
      Previous value: -"default"New value: +"strict_external_ai"
  3. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond the annotations by disclosing concrete side effects: writes to SECUREDACT_SAFE_COPY_DIR, never modifies the supplied content, never overwrites existing files, requires a bare '.txt' or '.md' filename, and blocks/reports 'blocked' on unconfigured directory, invalid filename, or policy failure. It also specifies the return shape.

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?

Three short paragraphs are used: purpose in the first sentence, usage guidance in the second, and side effects/return in the third. Every sentence earns its place and the description is front-loaded with the primary action.

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?

Given the side-effecting nature of the tool, the description covers the operation, side effects, blocking/failure conditions, and return format. Combined with the rich output schema and annotations, an agent has all necessary information to invoke it correctly and safely.

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?

The input schema already documents all three parameters with detailed descriptions (100% coverage), so the description's restatements such as 'content is not modified' and 'bare target filename' add little new meaning. The baseline of 3 applies; the description does not need to compensate for missing schema 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 states a specific verb and resource: 'Sanitize text locally and write the approved result to a new file in the Safe Copies directory.' It explicitly contrasts this with in-memory sanitization and names sibling tools for alternative use cases, so an agent can distinguish it immediately.

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?

It gives an explicit 'Use this when' condition (need a sanitized on-disk copy for storage, handoff, or archival) and names three sibling tools with their respective conditions: prepare_for_external_ai for sanitized text only, analyze_text for inspection-only, and restore_text for reversing a prior session. This is clear decision guidance.

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