Skip to main content
Glama

search_documentation

search_documentation

Find VeChain documentation, API references, and code examples by searching across official guides and resources to answer development questions.

Instructions

Search across the documentation to find relevant information, code examples, API references, and guides. Use this tool when you need to answer questions about VeChain Docs, find specific documentation, understand how features work, or locate implementation details. The search returns contextual content with titles and direct links to the documentation pages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query string

Implementation Reference

  • The callback function that executes the tool logic. It proxies the search query to the VeChain documentation MCP server by calling its 'searchDocumentation' tool.
    callback: async ({ query }: { query: string }) => {
        try {
            const vechainDocsMcpClient = await createVechainDocsMcpClient();
    
            const response = await vechainDocsMcpClient.client.callTool({ name: "searchDocumentation", arguments: { query } })
    
            return {
                content: [
                    {
                        type: "text",
                        text: JSON.stringify(response, null, 2),
                    },
                ],
            };
    
        } catch (err) {
            const isAbort = (err as Error)?.name === "AbortError";
    
            return {
                content: [
                    {
                        type: "text",
                        text: JSON.stringify(
                            {
                                error: isAbort ? "Request timed out" : "Failed to fetch account",
                                reason: String((err as Error)?.message ?? err),
                            },
                            null,
                            2
                        ),
                    },
                ],
            };
        }
    }
  • Zod input schema definition for the tool, specifying the 'query' parameter.
    inputSchema: {
        query: z.string().describe("The search query string"),
    },
  • src/server.ts:74-92 (registration)
    Registers all tools from the vechainTools array (including 'search_documentation') with the MCP server using their predefined properties and callbacks.
    for (const t of vechainTools) {
      server.registerTool(
        t.name,
        {
          title: t.name,
          description: t.description,
          inputSchema: t.inputSchema
        },
        async (args) => {
          const result = await t.callback(args);
          return {
            content: result.content.map(item => ({
              ...item,
              type: "text" as const
            }))
          };
        }
      );
    }
  • Helper function used by the handler to create an MCP client connected to the VeChain documentation server for proxying the search request.
    export async function createVechainDocsMcpClient() {
        try {
            const vechainDocsMcpClient = await createGitbookMcpClient(vechainConfig.mcpClient.vechainDocsUrl);
            return vechainDocsMcpClient
        } catch (err) {
            console.error("Error creating VeChain Docs MCP Client:", err);
            throw err;
        }
    }
  • src/tools.ts:30-72 (registration)
    Tool object definition in vechainTools array, which includes name, schema, description, and handler reference for registration.
    {
        name: "search_documentation",
        title: "Search VeChain Documentation",
        description: "Search across the documentation to find relevant information, code examples, API references, and guides. Use this tool when you need to answer questions about VeChain Docs, find specific documentation, understand how features work, or locate implementation details. The search returns contextual content with titles and direct links to the documentation pages.",
        inputSchema: {
            query: z.string().describe("The search query string"),
        },
        callback: async ({ query }: { query: string }) => {
            try {
                const vechainDocsMcpClient = await createVechainDocsMcpClient();
    
                const response = await vechainDocsMcpClient.client.callTool({ name: "searchDocumentation", arguments: { query } })
    
                return {
                    content: [
                        {
                            type: "text",
                            text: JSON.stringify(response, null, 2),
                        },
                    ],
                };
    
            } catch (err) {
                const isAbort = (err as Error)?.name === "AbortError";
    
                return {
                    content: [
                        {
                            type: "text",
                            text: JSON.stringify(
                                {
                                    error: isAbort ? "Request timed out" : "Failed to fetch account",
                                    reason: String((err as Error)?.message ?? err),
                                },
                                null,
                                2
                            ),
                        },
                    ],
                };
            }
        }
    },
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes what the tool does (search across documentation), what it returns (contextual content with titles and direct links), and the scope (VeChain Docs). It doesn't mention limitations like rate limits or authentication requirements, but provides solid operational context for a read-only search 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 perfectly concise and front-loaded. The first sentence establishes the core functionality, the second provides explicit usage guidelines, and the third describes the return format. Every sentence earns its place with no wasted words or redundant information.

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 single-parameter search tool with no annotations and no output schema, the description provides excellent context. It clearly explains what the tool does, when to use it, what it searches, and what it returns. The only minor gap is the lack of output format details beyond 'contextual content with titles and direct links,' but this is reasonable given the tool's simplicity.

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?

The schema description coverage is 100% with a single 'query' parameter clearly documented in the schema. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., query syntax, examples, or search operators). This meets the baseline of 3 when schema coverage is high.

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 purpose with specific verbs ('search across the documentation') and resources ('documentation, code examples, API references, guides'), distinguishing it from sibling tools which are all blockchain/transaction-related. It explicitly mentions the target domain ('VeChain Docs'), making the scope unambiguous.

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 provides explicit usage guidance with 'Use this tool when you need to answer questions about VeChain Docs, find specific documentation, understand how features work, or locate implementation details.' It clearly differentiates this documentation search tool from all sibling tools which handle blockchain operations like transactions, balances, and signing.

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

Install Server

Other Tools

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/leandrogavidia/vechain-mcp-server'

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