Skip to main content
Glama

query_entities

Browse knowledge-layer entities by type (observation, rule, knowledge) to avoid duplicates before writing or to review a type.

Instructions

Browse knowledge-layer entities of one type — 'observation' (raw findings, recency order), 'rule' (verified directives, confidence order), or 'knowledge' (curated docs). Use to enumerate what exists before writing (avoid duplicates) or to review a type — for ranked retrieval on a question use search; for code entities use list_entities or search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesAbsolute path to the project root containing `.cogz/`.
tagsNo`knowledge` only.
limitNo
statusNoStatus filter. Default: active only; `all` for every status.
categoryNo`knowledge` only.
referencesNo`observation`/`rule` only: filter to entities referencing this target UUID.
entity_typeYes`observation` | `rule` | `knowledge`. For code entities use `list_entities` or `search` instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.6

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses the ordering semantics per entity type (recency vs confidence) and that this is a browsing/enumeration operation, but it never explicitly states the operation is read-only/non-destructive, nor does it cover pagination or limit behavior. Adequate but with real gaps for an unannotated tool.

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?

Dense and front-loaded: the purpose and type enumeration come first, then the routing guidance. It is a single heavily em-dashed sentence, which packs a lot but stays readable and wastes little.

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?

With 7 parameters, no annotations, and no output schema, the description needs to carry usage and behavioral context, and it does cover purpose, routing, and ordering. Remaining gaps (pagination, read-only confirmation) are minor since the schema documents most parameters and no return-value explanation is required.

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 86%, so the schema already documents repo, tags, status, category, references, and entity_type. The description adds the ordering meaning of entity_type values but nothing about limit, tags, category, or references beyond what the schema states. Baseline 3 is appropriate.

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?

States a specific verb and resource ('Browse knowledge-layer entities of one type') and then enumerates the three valid types with their ordering semantics (observation=recency, rule=confidence, knowledge=curated docs). This lets an agent distinguish it from search, list_entities, and get_context without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use ('enumerate what exists before writing (avoid duplicates)' or 'review a type') and explicit when-not with named alternatives ('for ranked retrieval on a question use search; for code entities use list_entities or search'). Routing is unambiguous.

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