Skip to main content
Glama
Project Scope MCP Server

Project Scope MCP Server

detect_template_injection

Detect server-side template injection in templates or dynamic content before rendering, flagging dangerous Jinja2, Handlebars, ERB syntax and RCE payloads.

Instructions

Prevent Server-Side Template Injection (SSTI). Identifies dangerous template syntax from Jinja2, Handlebars, ERB, and others. Flags RCE payloads like {{config.class}}. Scan user-provided templates or dynamic content before rendering.

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": {
      "content": "<content>"
    },
    "name": "detect_template_injection"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoValidation mode (default: strict)
contentYesThe string or code content to analyze
sensitivityNoDetection sensitivity (default: high)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses detection scope and even an example RCE payload pattern, but it never clarifies whether the tool blocks, sanitizes, or merely reports, nor what the result looks like. With no output schema, the return behavior is left to inference.

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?

Four short sentences, front-loaded with the purpose and capped by the usage cue. Slight redundancy between 'Prevent SSTI' and 'Flags RCE payloads', but nothing is wasteful.

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

Completeness3/5

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

Given no annotations and no output schema, the description should say what a scan returns and whether it has side effects. It covers what is detected but leaves the result shape and enforcement posture unstated, which is a meaningful gap for a security-scan tool.

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 100% and includes enum defaults for mode and sensitivity, so the schema already documents all three parameters. The description adds no meaning beyond that — it does not explain what strict versus advisory mode changes or how sensitivity affects findings — so the baseline 3 applies.

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 — detecting Server-Side Template Injection by identifying dangerous template syntax in Jinja2, Handlebars, ERB, and others. The template-injection domain is clearly distinct from siblings like detect_prompt_injection, validate_sql_query, and validate_shell_input, so an agent can route correctly without opening the 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 a concrete use context: scan user-provided templates or dynamic content before rendering. That is a clear when-to-use signal. It stops short of naming alternatives or exclusions (e.g., when to use detect_prompt_injection instead), which keeps it from a 5.

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