Skip to main content
Glama
papyruslabs-ai

Seshat

Official

Find by Constraint

find_by_constraint
Read-onlyIdempotent

Find functions by syntactic constraint tag (AUTH, DB_ACCESS, THROWS, PURE, NETWORK_IO, VALIDATED) or by database table read/write, answering which code touches a given table.

Instructions

Find every function with a specific syntactic constraint tag — AUTH (requires authentication), DB_ACCESS (touches database), THROWS (explicit throw statement), PURE (no side effects), NETWORK_IO (makes HTTP calls), VALIDATED (has input validation). Also supports table-level queries: pass table="walks" to find every function that reads or writes the walks table (answers "what touches this table?" for schema migrations). Constraints are extracted from source syntax, not inferred. For semantic/behavioral properties (e.g., "can fail transitively"), use query_traits instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNoOptional: filter to functions that touch a specific database table (e.g., "walks", "users"). Returns structured db_operations showing read/write/mutate per function.
projectNoProject name (required in multi-project mode). Use list_projects to see available projects.
constraintYesConstraint tag to search for: AUTH, VALIDATED, PURE, THROWS, DB_ACCESS, NETWORK_IO, IMP, etc.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.2

TDQS

A3.9/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 safety profile is covered. The description adds a useful provenance fact – 'constraints are extracted from source syntax, not inferred' – which matters for trust in results, but does not disclose return format or pagination.

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?

Front-loads the core purpose and tag list, then adds table-level mode, then the semantic alternative. Three sentences, each earning its place, though the tag enumeration is lengthy and somewhat schema-duplicative.

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 3 parameters, no output schema, and rich annotations, the description covers both query modes, provenance, and the sibling routing clearly. It could note interaction between constraint and table parameters when used together, but the essential guidance is present.

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 coverage is 100%, so all three parameters are already documented. The description adds the constraint tag vocabulary and the table-mode semantics, which enriches meaning beyond raw schema strings, but the schema itself carries the parameter details.

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 (find) and resource (functions) with the exact mechanism (syntactic constraint tags), enumerating the tag values so an agent knows what's queryable. It also distinguishes itself from query_traits by naming the semantic alternative explicitly.

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?

Provides a clear when-to-use for two distinct modes (constraint-based and table-based) with a concrete example (table="walks"), and routes semantic queries to query_traits. Lacks explicit when-not guidance beyond the semantic case, but coverage is strong.

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