Skip to main content
Glama

infosys_search_code

Read-only

Search the code examples of the indexed pages for a fragment — a call pattern, an attribute, a constant (case-insensitive substring of the code as written; non-breaking spaces count as spaces).

Instructions

Search the code examples of the indexed pages for a fragment — a call pattern, an attribute, a constant (case-insensitive substring of the code as written; non-breaking spaces count as spaces). language: one that occurs in the index (an unknown one is refused with the list), '' / 'none' = samples without a label. limit 1..50; total_matches says how many there are. ignore_spacing=true also matches when only the spacing around punctuation differs. Returns the matching lines with context and the page URL.

Input Schema

NameRequiredDescriptionDefault
limitNoresults shown, 1-50
queryYes
languageNo
ignore_spacingNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.8.18
    • addedInput schema / properties / limit / description
      Added value: +"results shown, 1-50"
    • addedInput schema / properties / limit / maximum
      Added value: +50
    • addedInput schema / properties / limit / minimum
      Added value: +1
  2. Changed1 schema field changedv0.8.12
    • addedInput schema / properties / ignore_spacing
      Added value: +{
      +  "default": false,
      +  "title": "Ignore Spacing",
      +  "type": "boolean"
      +}
  3. First observedv0.6.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and non-destructive, so safety is covered. The description adds genuinely new behavior: unknown language values are rejected with the list of valid ones, total_matches reports the unshown count, results include matching lines with context plus the page URL, and non-breaking spaces are normalized to spaces.

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?

It is densely packed but nearly every clause carries parameter or return semantics; nothing is boilerplate. The single long run-on sentence with semicolons makes it slightly harder to scan than a bulleted or front-loaded layout would.

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

Completeness5/5

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

With four parameters, an output schema, and full read-only annotations, the definition covers the search semantics, the sentinel values, the refusal path, the limits, and the shape of the returned lines. An agent could invoke it correctly and interpret total_matches without further information.

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

Parameters5/5

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

Schema coverage is only 25% (only limit is documented in-schema), so the description must carry the load and does: it defines query as a case-insensitive substring of code as written including the non-breaking-space normalization, defines language membership and the '' / 'none' sentinel, restates the 1..50 limit with total_matches semantics, and explains ignore_spacing as punctuation-adjacent spacing tolerance.

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 uses a specific verb and resource ('Search the code examples of the indexed pages for a fragment') and enumerates the fragment kinds (call pattern, attribute, constant), which distinguishes it from the generic infosys_search and infosys_search_symbols. It never names those siblings explicitly, so the differentiation is left to inference.

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?

It gives clear operating context: substring matching is case-insensitive over code as written, an unknown language is refused with the valid list, '' / 'none' selects unlabeled samples, and limit is bounded 1..50. What is missing is an explicit statement of when to prefer this over infosys_search_symbols or infosys_search.

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

Deploy Server

Other Tools