Skip to main content
Glama
Shrike-Security

Shrike Security MCP Server

scan_file_write

Read-onlyIdempotent

Scan file content and path before writing to detect path traversal, secrets, PII, and sensitive file paths. Blocks unsafe writes to prevent credential leaks and accidental overwrites.

Instructions

Protective check on file operations — catches path traversal, leaked secrets, or sensitive paths before you write, so credentials don't leak through your hand.

Call this BEFORE writing any file to disk, storage, or output. Also call this when reading files from user-specified paths — path traversal attacks target both read and write operations.

DECISION LOGIC:

  • If blocked=true: do NOT write the file. Return the user_message to the caller.

  • If blocked=false: the file operation is safe to proceed.

Checks:

  • Sensitive file paths (.env, credentials, SSH keys, certificates)

  • Path traversal attacks (../, system directories)

  • PII in content (SSN, credit cards, emails)

  • Secrets in content (API keys, passwords, tokens)

  • Malicious code patterns (reverse shells, fork bombs)

Enterprise context: Prevents agents from accidentally writing credentials to logs, committing secrets to repositories, or overwriting system files.

ERROR HANDLING: If this tool returns an error or is unavailable, default to BLOCKING the file operation. Do NOT write unscanned content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe target file path to write to
contentYesThe content to be written to the file
modeNoWrite mode (default: overwrite)
session_idNoSession identifier for multi-turn correlation.
agent_idNoYour agent identifier for activity tracking.
parent_agent_idNoParent agent ID if you are a sub-agent (delegation chain tracking).
task_chainNoDelegation path from root agent (e.g., "main→research→fetch").
Behavior5/5

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

Annotations declare readOnlyHint=true and idempotentHint=true, and the description adds rich behavioral context: it is a check (not a mutation), catches various threats, and provides a decision flow. No contradictions.

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?

Well-structured with sections (DECISION LOGIC, Checks, Enterprise context, ERROR HANDLING). Front-loaded with the core purpose and usage. Every sentence adds value, no fluff.

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?

Despite no output schema, the description explains output semantics (blocked boolean, user_message). Covers decision logic, checks, error handling, and enterprise context thoroughly for a security-critical tool.

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

Parameters4/5

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

Schema coverage is 100% with descriptions for all parameters. The description adds extra context by explaining that 'path' can be sensitive and 'content' is scanned for PII/secrets, going beyond the schema.

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 clearly states it is a protective check for file operations, specifically catching path traversal, secrets, and sensitive paths. It distinguishes itself from sibling scan tools by focusing on file write operations.

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?

Explicitly instructs to call BEFORE writing any file, and also when reading files from user-specified paths. Provides decision logic (blocked=true -> don't write) and error handling instructions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Shrike-Security/shrike-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server