create_plan
Create subscription plans on the402.ai marketplace to bundle services at recurring prices for AI agents. Define plan details, pricing, and included services to monetize offerings.
Instructions
Create a subscription plan as a provider on the402.ai. Bundle one or more of your services at a recurring price. Agents can subscribe for monthly or annual access. Requires API key (provider account).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Plan name | |
| description | Yes | What the plan includes | |
| price | Yes | Recurring price in USD (e.g., '9.99') | |
| billing_period | Yes | Billing frequency | |
| service_ids | Yes | Service IDs included in this plan |
Implementation Reference
- src/tools/subscriptions.ts:91-104 (handler)Handler function for the 'create_plan' tool, which calls the authPost client method to create a new subscription plan.
async ({ name, description, price, billing_period, service_ids }) => { const result = await client.authPost("/v1/plans", { name, description, price, billing_period, service_ids, }); return { content: [ { type: "text" as const, text: JSON.stringify(result, null, 2) }, ], }; } - src/tools/subscriptions.ts:80-90 (schema)Input schema definition for the 'create_plan' tool, defining the required fields (name, description, price, billing_period, service_ids).
{ name: z.string().describe("Plan name"), description: z.string().describe("What the plan includes"), price: z.string().describe("Recurring price in USD (e.g., '9.99')"), billing_period: z .enum(["monthly", "annual"]) .describe("Billing frequency"), service_ids: z .array(z.string()) .describe("Service IDs included in this plan"), }, - src/tools/subscriptions.ts:77-78 (registration)Tool registration for 'create_plan' within the MCP server setup.
server.tool( "create_plan",