Skip to main content
Glama

aft_search

Run semantic code search over an indexed project to return ranked code fragments matching a natural-language query, with optional pattern filters and pagination.

Instructions

AFT semantic search (read-only). Requires the semantic index; returns ranked code fragments.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "aft_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
topKNo
queryNo
offsetNo
patternNo
includeTestsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose read-only safety, the index prerequisite, and the shape of the return (ranked fragments), which is meaningful. It omits what happens when the index is unavailable, whether results are paged, and how ranking/bounds behave, leaving real behavioral gaps.

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?

Two tight sentences with no filler, leading with the core purpose and following with the prerequisite and return shape. The only cost is an unexplained domain abbreviation ("AFT") at the very front.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter tool with zero schema coverage, no annotations, and no output schema, the description is too thin. It covers purpose, safety, and output shape but leaves every parameter's meaning and interaction (query vs pattern, paging via offset/topK) unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across five parameters (query, pattern, topK, offset, includeTests), and the description mentions none of them. "Ranked" faintly hints that a result limit exists, but topK bounds, offset paging, pattern usage, and includeTests filtering are entirely undocumented in both places.

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 pair ("AFT semantic search") and clarifies the deliverable ("ranked code fragments"). It implicitly separates itself from literal-search siblings like aft_grep by calling out "semantic", but it never names an 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 Guidelines3/5

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

"Requires the semantic index" gives a real prerequisite, and "semantic" implies when it fits versus keyword search. However, it gives no explicit when-to-use/when-not guidance and does not point to aft_grep or aft_glob for cases the semantic index cannot serve.

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