Skip to main content
Glama

search_docs

Read-onlyIdempotent

USE WHEN finding documentation sections that match specific terms across all Pine Script v6 docs. Returns up to max_results sections ranked by match count, each with a preview and a get_section() call hint. AFTER calling this tool, call get_section(file, header) for each result you want to read in full. Data sourced from bundled Pine Script v6 documentation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch terms (case-insensitive). Multi-word queries match sections containing ALL terms.
max_resultsNoMaximum sections to return.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / max_results / description
      Previous value: -"Maximum sections to return (default: 5)"New value: +"Maximum sections to return."
    • addedInput schema / properties / max_results / maximum
      Added value: +20
    • addedInput schema / properties / max_results / minimum
      Added value: +1
    • changedInput schema / properties / query / description
      Previous value: -"Search terms (case-insensitive). Multi-word queries\n   match sections containing ALL terms."New value: +"Search terms (case-insensitive). Multi-word queries match sections containing ALL terms."
    • addedInput schema / properties / query / minLength
      Added value: +1
  2. Changed1 schema field changed
    • changedInput schema / properties / query / description
      Previous value: -"Exact string to search for (case-insensitive)."New value: +"Search terms (case-insensitive). Multi-word queries\n   match sections containing ALL terms."
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is known. The description adds behavioral details beyond annotations: returns up to max_results sections ranked by match count, includes previews and get_section() call hints, and mentions the data source. This provides useful context for what to expect from the tool.

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 four sentences, front-loaded with 'USE WHEN', and every sentence earns its place: purpose, return behavior, next-step action, and data source. There is no redundancy or filler.

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?

Given the tool's simple interface (two parameters, no output schema), the description is complete: it explains what the search does, what results look like, how to proceed, and where data comes from. The sibling context and annotations further fill in the picture, so nothing critical is missing.

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% with meaningful descriptions for both parameters (query and max_results). The description reinforces the behavior of max_results ('Returns up to max_results sections') but does not add substantial new semantic information beyond what the schema already provides. A baseline of 3 is appropriate.

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 function: finding documentation sections matching specific terms across Pine Script v6 docs. The verb 'search' and resource 'docs' are specific, and it distinguishes itself from siblings like get_section (which retrieves a section by file/header) and list_sections (which likely lists all sections).

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 starts with 'USE WHEN', making the intended usage explicit, and provides a clear follow-up: 'call get_section(file, header) for each result you want to read in full.' This gives the agent a concrete workflow and effectively contrasts with the sibling get_section tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources