Skip to main content
Glama

tool_search_docs

Search bundled Ren'Py documentation offline for syntax, function names, and best practices before writing or debugging visual novel code.

Instructions

Search the bundled Ren'Py official documentation (Chinese, from doc.renpy.cn).

Searches through the local copy of the Ren'Py documentation and returns the most relevant sections. Works offline.

Use this BEFORE writing Ren'Py code if you're unsure about syntax, function names, or best practices. For example:

  • search_docs("Movie") to learn how to play videos

  • search_docs("screen") to understand screen language

  • search_docs("transform") to learn about ATL transforms

  • search_docs("call from") to understand call/from semantics

  • search_docs("存档") to find save/load documentation

  • search_docs("label return") to learn about label return mechanics

Args: query: Search query (supports both English and Chinese). max_results: Maximum number of results to return (default 5).

Returns: dict with {ok, query, results: [{file, title, snippet, score}], result_count}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
max_resultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses meaningful traits beyond structured fields: the corpus is offline/local, the documentation is Chinese, and the return format is spelled out ({ok, query, results:[{file,title,snippet,score}], result_count}). Search is inherently non-destructive, so little else is needed, though ranking/scoring behavior is not explained.

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?

Purpose is front-loaded in the first sentence, followed by corpus/offline notes, trigger guidance, examples, and Arg/Return documentation. The example block is somewhat long but each example clarifies a real usage pattern; the only minor noise is the 'search_docs(...)' calls using a name shorter than the actual tool name.

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?

For a two-parameter read-only search tool with no annotations and no output schema, the description covers what is needed: purpose, when to use it, both parameters, and the return structure. Nothing an agent needs to invoke it correctly is missing, though relative ranking behavior and result limits remain unspecified.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate, and it does: query is documented as supporting both English and Chinese, and max_results as the maximum to return with a default of 5. It adds useful meaning over the bare schema but does not explain matching semantics, so it is good compensation rather than exhaustive.

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?

States a specific verb (Search), resource (bundled Ren'Py official documentation), and scope (local copy, Chinese, doc.renpy.cn, returns most relevant sections). An agent immediately understands this is semantic doc search, but the description never names or contrasts with the sibling tool_list_doc_pages, so sibling differentiation is left implicit.

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?

'Use this BEFORE writing Ren'Py code if you're unsure about syntax, function names, or best practices' gives a clear trigger context, reinforced by six concrete query examples. It stops short of naming alternatives (e.g., tool_list_doc_pages) or stating when NOT to use it, so it is clear context without explicit exclusions.

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