Skip to main content
Glama

aidex_query

Search codebases for functions, classes, and variables by name using an indexed approach. Returns precise file locations where terms appear, offering faster and more accurate results than traditional grep searches.

Instructions

Search for terms/identifiers in the AiDex index. Returns file locations where the term appears. PREFERRED over Grep/Glob for code searches when .aidex/ exists - faster and more precise. Use this instead of grep for finding functions, classes, variables by name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to project with .aidex directory
termYesThe term to search for
modeNoSearch mode: exact match, contains, or starts_with (default: exact)
file_filterNoGlob pattern to filter files (e.g., "src/commands/**")
type_filterNoFilter by line type: code, comment, method, struct, property
modified_sinceNoOnly include lines modified after this time. Supports: "2h" (hours), "30m" (minutes), "1d" (days), "1w" (weeks), or ISO date string
modified_beforeNoOnly include lines modified before this time. Same format as modified_since
limitNoMaximum number of results (default: 100)
Behavior3/5

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

With no annotations provided, the description carries the full burden. It mentions performance traits ('faster and more precise') and the prerequisite (.aidex/ directory), which is useful. However, it lacks details on error handling, rate limits, authentication needs, or what happens if the index is outdated. For a search tool with 8 parameters, more behavioral context would be beneficial.

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 front-loaded with the core purpose, followed by usage guidelines. Every sentence earns its place: the first defines the tool, the second explains performance benefits and when to use it, and the third reinforces the use case. No wasted words, and it's appropriately sized for a search tool.

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 the complexity (8 parameters, no annotations, no output schema), the description is mostly complete. It covers purpose, usage context, and performance, but lacks details on output format (beyond 'file locations') and error scenarios. For a search tool, this is adequate but could be enhanced with more behavioral transparency.

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 the schema already documents all 8 parameters thoroughly. The description does not add any parameter-specific details beyond what the schema provides (e.g., it doesn't clarify 'term' semantics or 'type_filter' options). The baseline score of 3 is appropriate since the schema does the heavy lifting.

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 clearly states the tool's purpose: 'Search for terms/identifiers in the AiDex index. Returns file locations where the term appears.' It specifies the verb ('Search'), resource ('AiDex index'), and output ('file locations'), distinguishing it from siblings like aidex_describe or aidex_status that likely serve different purposes.

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?

The description provides explicit guidance on when to use this tool: 'PREFERRED over Grep/Glob for code searches when .aidex/ exists - faster and more precise. Use this instead of grep for finding functions, classes, variables by name.' It names alternatives (Grep/Glob) and specifies the condition (.aidex/ exists), making it highly actionable.

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

Install Server

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/CSCSoftware/AiDex'

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