Skip to main content
Glama

Tinplate Edge AI Safety, Security & EU Compliance

tinplate_llm_messages_guard

Read-onlyIdempotent

LLM Chat Messages Policy Proxy & Sanitizer API: Sanitize entire multi-turn LLM messages[] arrays in one call before forwarding to OpenAI, Anthropic, or Gemini. (Endpoint: POST /v1/llm-messages-guard)

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": {
      "messages": "<messages>"
    },
    "name": "tinplate_llm_messages_guard"
  }
}

Input Schema

NameRequiredDescriptionDefault
localesNoLocale sets for PII detection.
messagesYesArray of OpenAI, Anthropic, or agent chat messages to inspect and sanitize in a single pass.
redact_piiNoMask emails, phones, IBANs, credit cards, and national IDs across turns.
sensitivityNoPrompt-injection threshold sensitivity preset.medium
scan_secretsNoScrub leaked API keys, tokens, PEM keys, and credentials across turns.
strip_email_quotesNoStrip quoted email reply chains and signature blocks from user turns before scanning.
check_prompt_injectionNoScan user and tool turns for prompt injection and jailbreaks.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / messages / example
      Added value: +[
      +  {
      +    "content": "You are an enterprise billing assistant.",
      +    "role": "system"
      +  },
      +  {
      +    "content": "Please email the receipt to alice@example.com. Key: ghp_1234567890abcdefghijklmnopqrstuvwxyz",
      +    "role": "user"
      +  }
      +]
    • changedInput schema / properties / messages / items / properties / content / anyOf
      Previous value: -[
      -  {
      -    "maxLength": 131072,
      -    "type": "string"
      -  },
      -  {
      -    "items": {
      -      "properties": {
      -        "text": {
      -          "description": "Text payload of the content part; non-text parts without 'text' pass through untouched.",
      -          "example": "Hello, my email is alice@tinplate.dev",
      -          "maxLength": 131072,
      -          "type": "string"
      -        },
      -        "type": {
      -          "description": "Multimodal content part type (e.g., 'text', 'image_url').",
      -          "example": "text",
      -          "maxLength": 64,
      -          "minLength": 1,
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "type"
      -      ],
      -      "type": "object"
      -    },
      -    "maxItems": 32,
      -    "minItems": 1,
      -    "type": "array"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 131072,
      +    "type": "string"
      +  },
      +  {
      +    "example": [
      +      {
      +        "text": "Hello, my email is alice@example.com",
      +        "type": "text"
      +      }
      +    ],
      +    "items": {
      +      "properties": {
      +        "text": {
      +          "description": "Text payload of the content part; non-text parts without 'text' pass through untouched.",
      +          "example": "Hello, my email is alice@tinplate.dev",
      +          "maxLength": 131072,
      +          "type": "string"
      +        },
      +        "type": {
      +          "description": "Multimodal content part type (e.g., 'text', 'image_url').",
      +          "example": "text",
      +          "maxLength": 64,
      +          "minLength": 1,
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type"
      +      ],
      +      "type": "object"
      +    },
      +    "maxItems": 32,
      +    "minItems": 1,
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / messages / items / properties / content / example
      Previous value: -"Please summarize my account. My email is alice@tinplate.dev and my key is sk-proj-1234567890abcdefghijklmnop."New value: +"Please summarize my account. My email is alice@example.com and my key is sk-proj-1234567890abcdefghijklmnop."
  2. Changed6 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / messages / items / properties / content / anyOf
      Previous value: -[
      -  {
      -    "maxLength": 131072,
      -    "type": "string"
      -  },
      -  {
      -    "items": {
      -      "properties": {
      -        "text": {
      -          "example": "Hello, my email is alice@tinplate.dev",
      -          "maxLength": 131072,
      -          "type": "string"
      -        },
      -        "type": {
      -          "example": "text",
      -          "maxLength": 64,
      -          "minLength": 1,
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "type"
      -      ],
      -      "type": "object"
      -    },
      -    "maxItems": 32,
      -    "minItems": 1,
      -    "type": "array"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 131072,
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "properties": {
      +        "text": {
      +          "description": "Text payload of the content part; non-text parts without 'text' pass through untouched.",
      +          "example": "Hello, my email is alice@tinplate.dev",
      +          "maxLength": 131072,
      +          "type": "string"
      +        },
      +        "type": {
      +          "description": "Multimodal content part type (e.g., 'text', 'image_url').",
      +          "example": "text",
      +          "maxLength": 64,
      +          "minLength": 1,
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type"
      +      ],
      +      "type": "object"
      +    },
      +    "maxItems": 32,
      +    "minItems": 1,
      +    "type": "array"
      +  }
      +]
    • addedInput schema / properties / messages / items / properties / content / description
      Added value: +"Message text string or array of multimodal content parts to inspect and sanitize."
    • addedInput schema / properties / messages / items / properties / name / description
      Added value: +"Optional participant or tool name; scanned for PII, secrets, and injection on non-system/developer turns."
    • addedInput schema / properties / messages / items / properties / role / description
      Added value: +"Message author role; 'system' and 'developer' turns pass through without injection, PII, or secret scrubbing."
    • addedInput schema / properties / messages / items / properties / tool_call_id / description
      Added value: +"Optional tool call identifier associating a 'tool' response with a prior assistant tool call."
  3. Changed23 schema fields changed
    • addedInput schema / properties / check_prompt_injection / default
      Added value: +true
    • changedInput schema / properties / check_prompt_injection / description
      Previous value: -"Boolean flag 'check_prompt_injection' (default: true)"New value: +"Scan user and tool turns for prompt injection and jailbreaks."
    • addedInput schema / properties / check_prompt_injection / example
      Added value: +true
    • addedInput schema / properties / locales
      Added value: +{
      +  "default": [
      +    "GLOBAL",
      +    "EU",
      +    "US"
      +  ],
      +  "description": "Locale sets for PII detection.",
      +  "example": [
      +    "GLOBAL",
      +    "EU",
      +    "US"
      +  ],
      +  "items": {
      +    "maxLength": 10,
      +    "minLength": 2,
      +    "type": "string"
      +  },
      +  "maxItems": 10,
      +  "type": "array"
      +}
    • changedInput schema / properties / messages / description
      Previous value: -"Array parameter 'messages'"New value: +"Array of OpenAI, Anthropic, or agent chat messages to inspect and sanitize in a single pass."
    • addedInput schema / properties / messages / items / properties
      Added value: +{
      +  "content": {
      +    "anyOf": [
      +      {
      +        "maxLength": 131072,
      +        "type": "string"
      +      },
      +      {
      +        "items": {
      +          "properties": {
      +            "text": {
      +              "example": "Hello, my email is alice@tinplate.dev",
      +              "maxLength": 131072,
      +              "type": "string"
      +            },
      +            "type": {
      +              "example": "text",
      +              "maxLength": 64,
      +              "minLength": 1,
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "type"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 32,
      +        "minItems": 1,
      +        "type": "array"
      +      }
      +    ],
      +    "example": "Please summarize my account. My email is alice@tinplate.dev and my key is sk-proj-1234567890abcdefghijklmnop."
      +  },
      +  "name": {
      +    "maxLength": 128,
      +    "type": "string"
      +  },
      +  "role": {
      +    "enum": [
      +      "system",
      +      "developer",
      +      "user",
      +      "assistant",
      +      "tool"
      +    ],
      +    "example": "user",
      +    "type": "string"
      +  },
      +  "tool_call_id": {
      +    "maxLength": 128,
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / messages / items / required
      Added value: +[
      +  "role",
      +  "content"
      +]
    • addedInput schema / properties / messages / maxItems
      Added value: +100
    • addedInput schema / properties / messages / minItems
      Added value: +1
    • addedInput schema / properties / redact_pii / default
      Added value: +true
    • changedInput schema / properties / redact_pii / description
      Previous value: -"Boolean flag 'redact_pii' (default: true)"New value: +"Mask emails, phones, IBANs, credit cards, and national IDs across turns."
    • addedInput schema / properties / redact_pii / example
      Added value: +true
    • addedInput schema / properties / scan_secrets / default
      Added value: +true
    • changedInput schema / properties / scan_secrets / description
      Previous value: -"Boolean flag 'scan_secrets' (default: true)"New value: +"Scrub leaked API keys, tokens, PEM keys, and credentials across turns."
    • addedInput schema / properties / scan_secrets / example
      Added value: +true
    • addedInput schema / properties / sensitivity / default
      Added value: +"medium"
    • changedInput schema / properties / sensitivity / description
      Previous value: -"Parameter 'sensitivity' (e.g. \"medium\")"New value: +"Prompt-injection threshold sensitivity preset."
    • addedInput schema / properties / sensitivity / enum
      Added value: +[
      +  "low",
      +  "medium",
      +  "high"
      +]
    • addedInput schema / properties / sensitivity / example
      Added value: +"medium"
    • addedInput schema / properties / strip_email_quotes / default
      Added value: +false
    • changedInput schema / properties / strip_email_quotes / description
      Previous value: -"Boolean flag 'strip_email_quotes' (default: true)"New value: +"Strip quoted email reply chains and signature blocks from user turns before scanning."
    • addedInput schema / properties / strip_email_quotes / example
      Added value: +false
    • changedInput schema / required
      Previous value: -[
      -  "messages",
      -  "check_prompt_injection"
      -]New value: +[
      +  "messages"
      +]
  4. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world behavior. The description adds that this is a proxy/sanitizer for multi-turn message arrays, but it does not say whether the response contains cleaned messages, findings, or both; with no output schema, that is a meaningful omission.

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?

The core action and timing fit in one sentence, with the endpoint parenthetical as useful operational detail. The 'Policy Proxy & Sanitizer API' label overlaps somewhat with the name, but the description remains front-loaded and free of filler.

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?

For a seven-parameter tool with no output schema, the description is incomplete because it never explains the return value or whether the caller receives sanitized messages, a report, or both. It does provide enough context to know the tool's domain and endpoint, but not enough to predict response handling without inspecting further.

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 all seven parameters and nested message fields are already documented. The description adds only the aggregate notion of sanitizing messages[] in one pass and does not explain option interactions like locales, sensitivity, or the pass-through behavior of system/developer turns. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

It states a specific verb ('Sanitize') and resource ('entire multi-turn LLM messages[] arrays') and names the downstream LLM targets (OpenAI, Anthropic, Gemini). It does not explicitly distinguish itself from siblings such as tinplate_prompt_guard or tinplate_pii_redactor, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It establishes the intended moment—before forwarding messages to an LLM—and emphasizes one-call coverage. It gives no when-not guidance and never names an alternative tool for narrower tasks like prompt scanning or PII-only redaction.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources