Skip to main content
Glama

observe_chat

Destructive

Scans chat exchanges for secrets, PII, and policy risks; records usage and blocks disallowed prompts before running approved LLM requests.

Instructions

[WRITE][risk=medium] Scan + policy-gate a chat exchange, record it, then run if allowed.

Args: model: Model to run. messages: OpenAI-style [{"role","content"}] messages (contents are scanned). agent / user: Actor attribution recorded in the usage log. block_threshold: Block when risk band >= this. target: Ollama target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userNo
agentNounknown
modelYes
targetNo
messagesYes
block_thresholdNohigh

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.6/5.0
Behavior4/5

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

Despite annotations declaring destructiveHint=true and idempotentHint=false, the description adds meaningful behavioral detail: the scan-then-gate-then-record-then-run sequence, the block_threshold gating logic, and the WRITE/risk=medium tag. This goes beyond what annotations provide.

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 [WRITE][risk=medium] prefix front-loads the mutation and risk profile efficiently. The Args block is structured and readable, though slightly verbose in listing trivial parameters.

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?

No output schema exists, so the description should explain what is returned (the model response? a policy decision?). It doesn't. For a mutation tool with pipeline behavior, the absence of return-value context is a notable gap.

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 documents all 6 parameters reasonably — model, messages, agent/user, block_threshold, target — but lacks detail on format syntax (e.g., valid risk bands for block_threshold, config target format). Adequate but incomplete.

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?

The description uses a specific compound verb sequence: 'Scan + policy-gate a chat exchange, record it, then run if allowed.' This clearly states what the tool does. It is distinguishable from guarded_generate and scan_prompt, though it doesn't explicitly name those siblings to differentiate.

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 implied by the pipeline description but no explicit when-to-use vs alternatives is given. The relationship to guarded_generate and scan_prompt is unclear — an agent cannot tell which tool to pick for a given task.

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