Skip to main content
Glama
papyruslabs-ai

Seshat

Official

Query Traits

query_traits
Read-onlyIdempotent

Find functions by inferred behavioral trait—fallible, asyncContext, generator—to locate all code with a specific capability in the call graph.

Instructions

Find functions by inferred behavioral trait — "fallible" (can fail, including transitively via callees that throw), "asyncContext" (carries async state), "generator" (yields values). Traits are semantic properties inferred from the call graph, not just syntax. Use this when you need to find all code with a specific capability. For syntactic tags (explicit throw statements, DB access), use find_by_constraint instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
traitYesThe trait or capability to search for (e.g., "fallible", "asyncContext")
projectNoProject name (required in multi-project mode). Use list_projects to see available projects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.2

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds the key behavioral context that traits are call-graph-inferred semantics rather than syntax, but does not discuss performance, result format, or limitations of inference.

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?

Four sentences, each with a distinct role: definition, trait examples with semantics, when-to-use, and alternative tool. The parenthetical trait definitions are dense but front-loaded relevant information.

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?

Covers purpose, semantics, trait vocabulary, and sibling routing for a read-only query tool with full schema coverage and no output schema. Missing only the shape of returned results and multi-project mode behavior implied by the 'project' param.

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 both parameters are already documented. The description supplies example trait values ('fallible', 'asyncContext', 'generator') that enrich the enum-less 'trait' parameter, adding modest value over the schema.

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?

States a specific verb+resource ('Find functions by inferred behavioral trait') and enumerates example traits. It distinguishes from sibling find_by_constraint by contrasting semantic traits vs. syntactic tags, though the contrast arrives late.

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?

Gives an explicit when-to-use ('when you need to find all code with a specific capability') and names an alternative for a different case ('For syntactic tags ... use find_by_constraint instead'). Lacks exclusions for other sibling tools like find_error_gaps or find_entry_points.

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