Skip to main content
Glama

chargebee_code_planner

Generate integration workflows and code snippets for implementing Chargebee functionality in your application. Specify your goal and programming language to get accurate implementation guidance.

Instructions

Use this tool for any Chargebee integration questions or implementation needs.

Always use this tool to get the accurate integration code guide for Chargebee. This is the main tool developers need when asking about implementing Chargebee functionality (like "how to update billing address", "how to create subscription", "how to handle webhooks", etc.).

This tool will take in parameters about integrating with Chargebee in their application and generates an integration workflow along with the code snippets.

It takes the following arguments:

  • goal (string): What is the user's goal?

  • language (enum): Programming language the code to be generated in. Check the user's application language.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYesWhat is the user's goal?
languageNoProgramming language the code to be generated in. Check the user's application language.

Implementation Reference

  • The execute handler function for the 'chargebee_code_planner' tool. It calls chargebeeAIClient.getCodePlanner with the provided goal and optional language, returning the result or an error message.
    const generateCodePlanner = async (
    	parameters: z.infer<typeof codePlannerParameters>,
    ) => {
    	try {
    		const results = await chargebeeAIClient.getCodePlanner({
    			query: parameters.goal,
    			language: parameters.language,
    		});
    		return results;
    	} catch (error) {
    		if (error instanceof Error) {
    			console.error('Error generating code planner:', error.message);
    			return `Failed to generate code planner: ${error.message}`;
    		}
    		console.error('Error generating code planner:', error);
    		return 'Failed to generate code planner';
    	}
    };
  • Zod schema defining the input parameters for the tool: 'goal' (required string) and 'language' (optional enum of programming languages).
    const codePlannerParameters = z.object({
    	goal: z.string().describe(goalParamDescription),
    	language: z
    		.enum(['node', 'python', 'curl', 'java', 'go', 'ruby', 'php', 'dotnet'])
    		.describe(languageParamDescription)
    		.optional(),
    });
  • The tool configuration object defining the method name, name, description, parameters schema, and execute handler.
    export const codePlannerTool = {
    	method: 'chargebee_code_planner',
    	name: 'Chargebee Code Planner',
    	description: codePlannerPrompt,
    	parameters: codePlannerParameters,
    	execute: generateCodePlanner,
    };
  • src/tools/index.ts:1-8 (registration)
    Imports the codePlannerTool and includes it in the exported 'tools' array used 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,
    ];
  • src/mcp.ts:43-75 (registration)
    Registers all tools from the 'tools' array on the MCP server, using each tool's method, description, parameters, and execute function wrapped in error handling.
    private registerTools() {
    	tools.forEach((tool) => {
    		this.tool(
    			tool.method,
    			tool.description,
    			tool.parameters.shape,
    			async (arg: any) => {
    				try {
    					const result = await tool.execute(arg, this);
    
    					return {
    						content: [
    							{
    								type: 'text' as const,
    								text: JSON.stringify(result, null, 2),
    							},
    						],
    					};
    				} catch (error) {
    					return {
    						content: [
    							{
    								type: 'text' as const,
    								text: `Error: ${error instanceof Error ? error.message : String(error)}`,
    							},
    						],
    						isError: true,
    					};
    				}
    			},
    		);
    	});
    }
Behavior2/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 of behavioral disclosure. While it states the tool 'generates an integration workflow along with the code snippets,' it doesn't describe important behavioral aspects: whether this is a read-only operation, what format the output takes, whether there are rate limits, authentication requirements, or any potential side effects. For a code generation tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is reasonably structured with clear paragraphs, but contains some redundancy and could be more concise. The first two sentences convey similar information about when to use the tool. The parameter listing repeats information already in the schema. While it's not excessively verbose, some sentences don't earn their place by adding unique value beyond what's already stated.

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 that this is a code generation tool with no annotations and no output schema, the description provides adequate basic context about when to use it and what it does, but lacks important behavioral details. It doesn't describe the output format, error conditions, or operational constraints. For a tool that generates code workflows, users need to understand what kind of output to expect, which isn't addressed.

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 fully documents both parameters. The description repeats the parameter names and provides essentially the same information as the schema descriptions ('What is the user's goal?' and 'Programming language the code to be generated in'). It adds no additional semantic context beyond what's already in the structured schema fields, so the baseline score of 3 is appropriate.

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's purpose: 'generates an integration workflow along with the code snippets' for Chargebee integration questions. It specifies the resource (Chargebee integration) and verb (generates code/workflow). However, it doesn't explicitly differentiate from its sibling 'chargebee_documentation_search' - while it mentions this is for 'implementation needs' versus presumably documentation search, the distinction isn't made explicit.

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: 'Use this tool for any Chargebee integration questions or implementation needs' and 'Always use this tool to get the accurate integration code guide for Chargebee.' It gives specific examples of when to use it ('how to update billing address', 'how to create subscription', etc.) and positions it as 'the main tool developers need' for implementation questions, clearly establishing its primary role.

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/ampcome-mcps/chargebee-mcp'

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