Skip to main content
Glama

selection_integrity

Audits top-k retrieval integrity by comparing actual results against trust-anchored memories, flagging displaced facts and untrusted records.

Instructions

Make SELECTION-LEVEL manipulation auditable (read-only, no LLM). Provenance/tamper-evidence check that retrieved records are authentic, but are blind to an attacker who injects authentic-looking UNTRUSTED writes that REROUTE which trusted facts reach the top-k. This diffs the top-k the agent ACTUALLY gets against the top-k of only trust-anchored memories, and surfaces any qualified fact that untrusted writes displaced, plus the untrusted records occupying top-k slots. Returns {stable, displaced, untrusted_in_topk, k}. Needs a trust root (INSPEXIMUS_TRUST_SEEDS on this server); without one it says so. Flags, never rewrites.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
queryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.20.1

TDQS

A3.9/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. It discloses that the tool is read-only, flags rather than rewrites, requires a trust root, and returns a specific structure. This is substantial behavioral context beyond the schema and useful for an agent.

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 description is a single dense paragraph but front-loads the purpose and keeps each sentence informative. It covers behavior, prerequisites, and output without redundancy. Slightly long, but justified by the complexity of the tool.

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?

Given no output schema and no annotations, the description provides the return fields, the prerequisite trust root, and the non-destructive flag behavior. It lacks examples or detailed error scenarios, but for a complex audit tool it is remarkably complete.

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 should compensate. It mentions 'k' in the return object and the top-k concept, and 'query' is implied as the retrieval query. However, it does not explicitly define either parameter's semantics or format, leaving some inference needed.

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 purpose: auditing selection-level integrity by diffing the actual top-k against trust-anchored memories. It names the return fields and clarifies it is a provenance/tamper-evidence check. This clearly distinguishes it from sibling audit tools by focusing on retrieval selection manipulation rather than broader record integrity.

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?

The description explains the scenario it addresses: attackers injecting untrusted writes that reroute trusted facts from the top-k. It implicitly tells when to use it, but does not mention alternatives or when not to use it. Given the many sibling audit tools, explicit routing guidance would be valuable but is absent.

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