Skip to main content
Glama

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
NameRequiredDescriptionDefault
nameYesPlan name
descriptionYesWhat the plan includes
priceYesRecurring price in USD (e.g., '9.99')
billing_periodYesBilling frequency
service_idsYesService IDs included in this plan

Implementation Reference

  • 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) },
    		],
    	};
    }
  • 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"),
    },
  • Tool registration for 'create_plan' within the MCP server setup.
    server.tool(
    	"create_plan",

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