Skip to main content
Glama
GigantesHJI

securedact-mcp

create_safe_copy

Sanitize text locally and write the approved result to a new file for safe storage, without overwriting existing files or transmitting data.

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?

No annotations are present, so the description carries the full burden—and it excels. It discloses side effects: writes a new file to SECUREDACT_SAFE_COPY_DIR, does not modify 'content', never overwrites an existing file, blocks with status 'blocked' under specific conditions, and returns a JSON structure. This is a thorough disclosure of behavior beyond the schema.

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: core action first, then usage guidance, then side effects, then return format. Each paragraph adds distinct value with no redundancy. Concise yet complete, and front-loaded with the most important decision-driving 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?

Given the tool's moderate complexity (3 parameters, no nested objects), an output schema exists (per signals), and the description itself explains side effects, blocking conditions, filename constraints, and return format. Nothing an agent needs to call it correctly is missing. The description is fully self-contained even without annotations.

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 coverage is 100%, so the schema fully describes all three parameters. The description adds practical context (e.g., filename must be bare, policy defaults to 'strict_external_ai', content is never transmitted) but does not materially enhance the semantic meaning beyond what the schema already provides. Baseline 3 is appropriate.

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?

States a specific action ('sanitize text locally and write the approved result to a new file'), names the resource ('Safe Copies directory'), and explicitly differentiates from all four siblings by naming them and the conditions under which each is preferred. An agent can immediately tell this tool writes a sanitized copy to disk.

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 second paragraph gives explicit when-to-use guidance: 'Use this when you need a sanitized on-disk copy... rather than an in-memory sanitized string,' and names the alternative tools (prepare_for_external_ai, analyze_text, restore_text) with their complementary use cases. This fully eliminates ambiguity about tool selection.

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