Skip to main content
Glama

docs_scan

Scan Word, Excel, and PowerPoint files for prompt-injection payloads, hidden instructions, invisible Unicode, and encoded content before an agent reads untrusted documents.

Instructions

Scan Office documents (.docx/.xlsx/.pptx) for prompt-injection payloads.

Use when the user asks to check a Word/Excel/PowerPoint file for hidden instructions, poisoned content, invisible Unicode, or encoded payloads — e.g. an email attachment the agent is about to read, a "spec" document from an untrusted source, or hidden text (w:vanish) inside a contract. path is a local file or directory. Coverage is reported honestly: files/parts/chars actually scanned (not "the whole repo"). formats (optional) writes report artifacts (json/sarif/markdown/html) locally. Detection faces: document poisoning (PIT-N-06), invisible characters (PIT-E-23), trojan source (PIT-E-54), encoding family — same rules as pitax_scan. Not for: plain text or source code — use pitax_scan / code_audit. Triggers: check this Word/Excel/PPT file, is this document poisoned, 邮件附件 安全吗, 文档投毒, 隐藏文字, Word 里藏了指令.

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": "docs_scan"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
formatsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.5

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and largely meets it: it names the detection faces covered (document poisoning, invisible characters, trojan source, encoding family), states that coverage is reported honestly as files/parts/chars actually scanned, and discloses that report artifacts are written locally. What it does not state is whether the source documents themselves are modified or left untouched, and there is no note on permissions or size limits.

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?

Front-loads purpose, then usage, then parameters, then exclusions and triggers — a sensible ordering. Most lines earn their place, though the 'Coverage is reported honestly ... (not "the whole repo")' aside is defensively worded and slightly noisy, and the trigger list adds bulk for a mostly self-explanatory tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be described. For a two-parameter read/analysis tool, the description covers purpose, scope, detection coverage, side effects and exclusions. The only substantive hole is the encoding/format syntax of the optional `formats` parameter.

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 description coverage is 0%, so the description must compensate. It does clarify `path` ('a local file or directory'), which is genuinely useful since the schema says only 'string'. For `formats` it names the four artifact types (json/sarif/markdown/html) but never says how to specify multiple values in a single string, whether names must match exactly, or what happens with the empty default — a real gap for a string-typed option.

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?

Opens with a concrete verb+resource pair ('Scan Office documents (.docx/.xlsx/.pptx) for prompt-injection payloads') and explicitly carves out the boundary against siblings: 'Not for: plain text or source code — use pitax_scan / code_audit'. An agent can distinguish it from pitax_scan and code_audit without opening any schema.

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?

Gives an explicit when-to-use clause ('Use when the user asks to check a Word/Excel/PowerPoint file for hidden instructions...'), three concrete scenarios (email attachment about to be read, untrusted spec doc, hidden w:vanish text in a contract), and an explicit negative case routing to alternatives. Triggers, including non-English ones, further reduce misfire risk.

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