Skip to main content
Glama
opami-protect-mcp

opami-protect-mcp

Official
by opamiai

protect_file

Hides sensitive data in a local UTF-8 text file without loading its content into context, returning placeholder text and a map_id for later restoration.

Instructions

Hides private and sensitive data (names, emails, phone numbers and similar) in a local UTF-8 text file without putting the file's content in your context. Pass the file's path inside the workspace folders your client shares. The server reads the file itself and sends its text to the Opami Protect API, which keeps nothing. It returns the text with placeholders such as [PERSON_1] and a short map_id. This is pseudonymisation, and it can be reversed: the server keeps the placeholder map in its own memory for this session, and restore_text with that map_id puts the real values back. The real values stay in the server: protect_file has no return_map, so they and the map are never in the result. Text files of up to 1 MB only; PDF, DOCX and other binary files are refused. Files outside the workspace folders are refused, including through symlinks.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "protect_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath of a UTF-8 text file inside the client's workspace folders. Absolute, or relative when the client shares exactly one folder.
excludeNoCategories, sub-categories or types to leave as they are (for example "contact.email"). At most 50.

Output Schema

NameRequiredDescriptionDefault
usageYes
map_idYes
request_idYes
placeholder_textYes
placeholder_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: the server reads the file itself, sends text to the Opami Protect API 'which keeps nothing', retains the placeholder map in memory for the session only, and deliberately omits return_map so real values never appear in the result. It also discloses hard limits (1 MB), refusal of binary formats, and symlink-based escape prevention.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is information-dense but front-loaded: purpose first, then data-flow and reversibility, then limits and refusals. Every sentence contributes a specific fact, though the API-privacy asides and the repeated emphasis that real values stay server-side could be tightened slightly.

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 file-processing mutation tool with no annotations, the description covers what an agent needs: data flow, reversibility and session-scoped map lifetime, size and format limits, path restrictions, and why no map is returned. An output schema exists, yet the description still gives enough return context (placeholder tokens plus a short map_id) without over-explaining.

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 both parameters are already documented, and the description adds only the path constraint (must be inside shared workspace folders, absolute or relative when a single folder is shared) which largely restates the schema. The exclude parameter and its category semantics are never mentioned in the description, so it adds little beyond the structured fields.

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: hide PII in a local UTF-8 text file, with the distinctive scope qualifier that the file's content never enters the agent's context. That qualifier implicitly separates it from protect_text, and it names restore_text as the reversal path, so an agent can tell these apart without opening a schema.

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?

It gives clear when-to-use context (file on disk inside workspace folders) and explicit when-not conditions (PDF/DOCX and other binaries, files outside workspace, including via symlinks, are refused). It also points to restore_text with the map_id for reversal. It stops short of naming protect_text as the alternative when the text is already in context, leaving that inference to the reader.

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

Deploy Server

Other Tools