Skip to main content
Glama

chargebee_documentation_search

Search Chargebee documentation to find answers about subscription management, billing concepts, product features, and general documentation queries without implementation details.

Instructions

Only use this tool for general product documentation queries, NOT for implementation questions.

Do not use this tool for code generation or implementation questions. For any developer questions about implementing Chargebee functionality (like "how to update billing address", "how to create subscription", etc.), use "chargebee_code_planner" tool instead.

This tool should only be used for:

  • General product documentation queries about Chargebee's features and concepts

  • Understanding billing, payments, receivables, revenue recognition concepts

  • Learning about subscription management processes

  • Finding product feature explanations and overviews

  • Non-implementation related documentation queries

It takes the following arguments:

  • query (string): The user query to search an answer for in the Chargebee documentation.

  • language (enum): The programming language for the documentation. Check the user's application language.

  • userRequest (string): User's original request to you.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe user query to search an answer for in the Chargebee documentation.
userRequestNoUser's original request to you.
languageNoThe programming language for the documentation. Check the user's application language.

Implementation Reference

  • The core handler function that executes the tool's logic by invoking chargebeeAIClient.documentationSearch with query, language filter, and userRequest.
    const documentationSearch = async (
    	parameters: z.infer<typeof documentationSearchParameters>,
    ) => {
    	try {
    		const results = await chargebeeAIClient.documentationSearch({
    			query: parameters.query,
    			filters: {
    				language: parameters.language,
    			},
    			userRequest: parameters.userRequest,
    		});
    		return results;
    	} catch (error) {
    		if (error instanceof Error) {
    			console.error('Error searching documentation:', error.message);
    			return `Failed to search documentation: ${error.message}`;
    		}
    		console.error('Error searching documentation:', error);
    		return 'Failed to search documentation';
    	}
    };
  • Zod schema defining the tool's input parameters: query (string, required), userRequest (string, optional), language (enum of SDKs, optional).
    const documentationSearchParameters = z.object({
    	query: z.string().describe(queryParamDescription),
    	userRequest: z.string().describe(userRequestParamDescription).optional(),
    	language: z
    		.enum([
    			'node',
    			'python',
    			'curl',
    			'java',
    			'go',
    			'ruby',
    			'php',
    			'dotnet',
    		])
    		.describe(languageParamDescription)
    		.optional(),
    });
  • Tool registration object specifying the method name, name, description (prompt), parameters schema, and execute handler.
    export const documentationSearchTool = {
    	method: 'chargebee_documentation_search',
    	name: 'Chargebee Documentation Search',
    	description: documentationSearchPrompt,
    	parameters: documentationSearchParameters,
    	execute: documentationSearch,
    };

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/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 clearly indicates this is a search tool for documentation, implying a read-only, non-destructive operation. It does not mention side effects, rate limits, or return format, but the core behavior is transparent enough for an agent.

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 well-structured, starting with critical usage boundaries, then listing use cases, then parameters. It is front-loaded with the most important information. It could be slightly more concise, but every sentence serves a clear purpose.

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 no annotations and no output schema, the description does not specify what the tool returns (e.g., format, if results are snippets or full documents) or error handling. However, it covers usage boundaries and parameter semantics adequately for a search tool with a sibling distinction.

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 coverage is 100%, so baseline is 3. The description adds value by providing usage context for each parameter (e.g., 'Check the user's application language' for language, and 'User's original request to you' for userRequest), which helps the agent set values correctly.

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 is for 'general product documentation queries' and explicitly distinguishes it from the sibling tool, naming the sibling and specifying when to use that alternative. It lists specific use cases, making the purpose highly distinct and actionable.

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 when-to-use and when-not-to-use guidance, including naming the alternative tool 'chargebee_code_planner' for implementation questions. It also enumerates specific allowed query types, leaving no ambiguity.

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