chargebee_documentation_search
Search Chargebee documentation to find answers about product features, billing, payments, subscription management, and revenue recognition. Use this tool for general documentation queries, not implementation or code generation tasks.
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
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | The programming language for the documentation. Check the user's application language. | |
| query | Yes | The user query to search an answer for in the Chargebee documentation. | |
| userRequest | No | User's original request to you. |
Implementation Reference
- src/tools/documentation-search.ts:53-73 (handler)The handler function that executes the tool logic: calls chargebeeAIClient.documentationSearch with the provided query, optional language filter, and userRequest, handles errors, and returns results.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 input schema defining parameters: query (string), userRequest (optional string), language (optional enum of SDKs).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(), });
- src/tools/documentation-search.ts:78-84 (registration)Exports the tool configuration object with method name, description, parameters schema, and execute handler reference.export const documentationSearchTool = { method: 'chargebee_documentation_search', name: 'Chargebee Documentation Search', description: documentationSearchPrompt, parameters: documentationSearchParameters, execute: documentationSearch, };
- src/tools/index.ts:1-8 (registration)Includes the documentationSearchTool in the tools array that is imported and registered by the MCP server.import { Tool } from '../types.js'; import { documentationSearchTool } from './documentation-search.js'; import { codePlannerTool } from './code-planner.js'; export const tools: Tool[] = [ codePlannerTool, documentationSearchTool, ];
- The ChargebeeAIClient method called by the handler: sends POST to /documentation_search API endpoint and returns results.public documentationSearch: Method<DocumentationSearchParams, DocumentationSearchResponse['results']> = async (params: DocumentationSearchParams) => { const response = await this.request<DocumentationSearchResponse>({ endpoint: '/documentation_search', method: 'POST', body: JSON.stringify({ ...params, }), }); return response.results; };