Skip to main content
Glama
papyruslabs-ai

Seshat

Official

Query Entities

query_entities
Read-onlyIdempotent

Find functions, classes, and routes by name, architectural layer, or module, returning matching symbols with type, file, and layer. Use it instead of text grep to locate code by purpose.

Instructions

Like grep but for code structure. Find functions, classes, and routes by name, architectural layer (route/service/component), or module. Returns matching symbols with their type, file, and layer — use this instead of grep when you need to find code by what it does, not by text content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layerNoFilter by architectural layer: route, controller, service, repository, utility, hook, component, schema
limitNoMax results to return (default: 50)
queryNoSearch term — matches against symbol name, ID, source file, and module
moduleNoFilter by module (partial match)
projectNoProject name (required in multi-project mode). Use list_projects to see available projects.
languageNoFilter by source language: javascript, typescript, python, go, rust, etc.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.2

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is clear. The description adds that it finds symbols by architectural layer and returns type, file, and layer — useful context. However, it doesn't mention pagination, result limits (beyond the default in schema), or whether results are ranked/filtered. With annotations covering the safety profile, a 3 is appropriate.

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 sentences with zero waste, front-loading the analogy and core functionality, then the usage guideline. Every clause earns its place, and the structure moves from what it is to when to use it.

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 read-only query tool with no output schema and 100% schema coverage, the description is complete enough: it explains what it finds, how to filter, what it returns, and when to prefer it over grep. It misses guidance on result ordering or pagination, which could matter for an agent planning calls, but against a rich schema and annotations, the gap is minor.

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 100%, so all parameters are fully documented in the schema. The description mentions the primary query dimensions (name, layer, module) but doesn't add syntax, format, or interaction details beyond what the schema provides. Baseline 3 is correct when the schema does the heavy lifting.

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 states a specific verb+resource ('find functions, classes, and routes') and explains the mechanism ('by name, architectural layer, or module'). The 'grep but for code structure' analogy is vivid and immediately conveys the tool's purpose. It distinguishes itself from other query tools but doesn't explicitly contrast with siblings like get_entity or find_by_constraint, which also retrieve code entities.

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: 'use this instead of grep when you need to find code by what it does, not by text content.' This is an explicit when-to-use statement. However, it doesn't specify when to use this versus other sibling tools like get_entity (which might retrieve a single entity) or find_by_constraint (which might be for more complex queries). The guidance is strong but incomplete for a tool among 26 siblings.

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