Skip to main content
Glama

selection_integrity

Audits selection integrity by diffing retrieved top-k memories against trust-anchored records, surfacing displaced authentic facts and untrusted entries occupying top-k slots.

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 (trust_seeds / attested writes); without one it says so. Flags, never rewrites.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
queryYes
Install Server

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description fully carries the burden of behavioral disclosure. It states the tool is read-only, never rewrites, returns a specific object, requires a trust root, and handles missing trust roots by saying so. It also discloses a conceptual limitation: blindness to authentic-looking untrusted writes that reroute top-k selection.

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?

The description is dense but every sentence earns its place, front-loading the core purpose and then adding necessary context about the threat model, return value, prerequisite, and behavioral constraints. There is no redundant or filler content.

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 complex, annotation-free tool with no output schema, the description covers the return shape, trust-root prerequisite, read-only behavior, and the threat it addresses. The main gap is explicit parameter semantics, but the conceptual explanation is rich enough for an agent to infer the tool's role and invocation context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not explicitly define either 'query' or 'k' parameters. The algorithm references 'top-k', so 'k' is inferable, and the notion of a retrieval query is implicit, but the description never names or explains the required 'query' parameter or how it maps to the check.

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: making selection-level manipulation auditable via a provenance/tamper-evidence check that diffs the actual top-k against a trust-anchored top-k. It uses clear verbs like 'diffs', 'surfaces', and 'flags', and it distinguishes itself from siblings by explicitly being read-only, non-LLM, and non-rewriting.

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?

The description gives clear context: this is a read-only audit tool that detects untrusted writes displacing trusted facts, and it requires a trust root. It implies when to use it (when selection integrity matters) and what to expect without a trust root, though it does not name alternative sibling tools explicitly.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DanceNitra/inspeximus'

If you have feedback or need assistance with the MCP directory API, please join our Discord server