Skip to main content
Glama

manage_plan

Modify or remove subscription plans on the402.ai marketplace. Requires plan owner authentication to update details or delete plans.

Instructions

Update or delete a subscription plan on the402.ai. Only the provider who created the plan can modify it. Requires API key (plan owner).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
plan_idYesThe plan ID
actionYesupdate = modify plan details, delete = remove plan
nameNoNew plan name (for update)
descriptionNoNew description (for update)
priceNoNew price (for update)

Implementation Reference

  • The implementation of the 'manage_plan' tool, which handles updating or deleting subscription plans.
    server.tool(
    	"manage_plan",
    	"Update or delete a subscription plan on the402.ai. Only the provider who created the plan can modify it. Requires API key (plan owner).",
    	{
    		plan_id: z.string().describe("The plan ID"),
    		action: z
    			.enum(["update", "delete"])
    			.describe("update = modify plan details, delete = remove plan"),
    		name: z.string().optional().describe("New plan name (for update)"),
    		description: z
    			.string()
    			.optional()
    			.describe("New description (for update)"),
    		price: z.string().optional().describe("New price (for update)"),
    	},
    	async ({ plan_id, action, name, description, price }) => {
    		if (action === "delete") {
    			const result = await client.authDelete(`/v1/plans/${plan_id}`);
    			return {
    				content: [
    					{ type: "text" as const, text: JSON.stringify(result, null, 2) },
    				],
    			};
    		}
    
    		const body: Record<string, unknown> = {};
    		if (name) body.name = name;
    		if (description) body.description = description;
    		if (price) body.price = price;
    
    		const result = await client.authPut(`/v1/plans/${plan_id}`, body);
    		return {
    			content: [
    				{ type: "text" as const, text: JSON.stringify(result, null, 2) },
    			],
    		};
    	}
    );
Behavior3/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 discloses key behavioral traits: it's a mutation tool (implied by 'update or delete'), requires specific permissions ('Only the provider who created the plan can modify it'), and needs authentication ('Requires API key (plan owner)'). However, it lacks details on side effects, error handling, or response format, leaving gaps in transparency.

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 highly concise and front-loaded, consisting of two sentences that efficiently convey purpose and prerequisites. Every sentence adds value without redundancy, making it easy to parse and understand quickly.

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 tool's complexity (mutation with permissions), lack of annotations, and no output schema, the description is moderately complete. It covers purpose and prerequisites but omits details on behavior, return values, or error cases. For a mutation tool, this leaves room for improvement in guiding the agent fully.

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%, providing detailed parameter documentation. The description adds no additional parameter semantics beyond what's in the schema. With high coverage, the baseline is 3, as the description doesn't compensate but also doesn't detract from the schema's completeness.

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: 'Update or delete a subscription plan on the402.ai.' It specifies the verb ('update or delete') and resource ('subscription plan'), making the action clear. However, it doesn't explicitly differentiate from sibling tools like 'create_plan' or 'list_plans', though the action distinction is implied.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: for modifying existing plans, with prerequisites ('Only the provider who created the plan can modify it. Requires API key (plan owner).'). It doesn't explicitly state when not to use it or name alternatives like 'create_plan' for new plans, but the context is sufficient for informed usage.

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

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