Skip to main content
Glama
gamai-preflight

gamai-preflight

Official
by gamai-io

preflight_text

Scores inbound text for prompt injection and returns allow, review, or block with the guard rule that fired, enabling fast pre-agent filtering without an LLM call.

Instructions

Score inbound text for prompt injection with gamai-guard (lexical + optional embedding cascade). Returns allow/review/block plus the guard rule that fired, under 10 ms and with no LLM call.

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": {
      "text": "<text>"
    },
    "name": "preflight_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesthe inbound prompt or tool output
embed_urlNoguard worker URL to enable the semantic layer

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it discloses the output vocabulary (allow/review/block plus the fired rule), the latency envelope (<10 ms), and that no LLM call is made, which tells the agent this is a cheap deterministic gate. It omits failure behavior and whether the submitted text is retained or logged, which matters for a tool that consumes raw prompts.

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?

Two dense sentences with no filler: the action and engine come first, then return values, then the cost profile. Every clause (latency, no LLM call, optional embedding) gives the agent information it would otherwise have to probe for.

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?

For a 2-parameter tool with no output schema, the description covers what the return values mean, how they are produced, and the performance profile, which is enough to invoke it correctly. The one missing piece is data-handling/failure semantics for the submitted text.

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%, and the schema already explains both parameters, including that embed_url enables the semantic layer. The description's '(lexical + optional embedding cascade)' only corroborates that embed_url is optional and lexical is the default, so it adds marginal meaning over the schema; 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?

States a specific verb and resource: 'Score inbound text for prompt injection' with the named engine 'gamai-guard', plus the decision output. It is unambiguous what the tool does, but it never references its sibling preflight_log, so separation between the two is left to the agent to infer from the names.

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?

Usage is only implied: the 'preflight' framing, sub-10 ms cost note, and 'inbound prompt or tool output' in the schema suggest calling it before trusting text. There is no explicit when-to-use, when-not-to-use, or contrast with preflight_log (e.g., score-only vs. log-and-score).

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