Skip to main content
Glama

get_doc_snippets

Retrieve precise code snippets and concise answers from official documentation for technical queries, solving issues by providing exact solutions with optional version targeting.

Instructions

Provides precise, authoritative code snippets or concise answers for technical queries by searching official documentation. Focuses on delivering exact solutions without unnecessary explanation. Uses the configured Vertex AI model (gemini-2.5-pro) with Google Search. Requires 'topic' and 'query'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe specific question or use case to find a snippet or concise answer for.
topicYesThe software/library/framework topic (e.g., 'React Router', 'Python requests', 'PostgreSQL 14').
versionNoOptional. Specific version of the software to target (e.g., '6.4', '2.28.2'). If provided, only documentation for this version will be used.
include_examplesNoOptional. Whether to include additional usage examples beyond the primary snippet. Defaults to true.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

B3.4/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 discloses that the tool uses the Vertex AI model (gemini-2.5-pro) with Google Search, which is useful behavioral context. However, it does not describe the output format, error behavior, or any limitations such as what happens if no documentation is found.

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?

The description is three sentences long, front-loading the purpose and then adding focus and method. It is concise and free of fluff, though it could be slightly more structured with explicit sections.

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

Completeness3/5

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

Given the lack of an output schema, the description gives a general sense that snippets or answers are returned but does not detail the response structure or handle edge cases like no results. For a relatively simple tool with four parameters, this is adequate but not thorough.

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 four parameters. The description adds no new semantic information beyond restating that 'topic' and 'query' are required. This meets the baseline for fully covered schemas.

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 clearly states the tool provides code snippets or concise answers by searching official documentation, emphasizing precision and lack of unnecessary explanation. This distinguishes it from explanation-focused siblings like explain_topic_with_docs, though it does not explicitly name any alternative tool.

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?

The description implies the tool is for exact solutions without explanation, which gives a sense of when to use it, but it does not explicitly state when not to use it or name alternative tools like answer_query_websearch. The requirement for 'topic' and 'query' is stated but is redundant with the schema.

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

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/shariqriazz/google-ai-search-mcp'

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