Skip to main content
Glama

manage_subscription

Cancel, pause, or resume subscriptions on the402.ai marketplace. Cancel maintains access until current period ends. Requires subscription ID and action selection.

Instructions

Manage your subscription on the402.ai — cancel, pause auto-renewal, or resume a paused subscription. Cancelling still gives access until the current period ends. Requires API key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subscription_idYesThe subscription ID
actionYescancel = end at period end, pause = stop auto-renewal, resume = restart auto-renewal, details = view subscription info

Implementation Reference

  • Implementation of the manage_subscription tool which handles subscription management actions like cancel, pause, resume, or fetching details.
    server.tool(
    	"manage_subscription",
    	"Manage your subscription on the402.ai — cancel, pause auto-renewal, or resume a paused subscription. Cancelling still gives access until the current period ends. Requires API key.",
    	{
    		subscription_id: z.string().describe("The subscription ID"),
    		action: z
    			.enum(["cancel", "pause", "resume", "details"])
    			.describe(
    				"cancel = end at period end, pause = stop auto-renewal, resume = restart auto-renewal, details = view subscription info"
    			),
    	},
    	async ({ subscription_id, action }) => {
    		if (action === "details") {
    			const result = await client.authGet(
    				`/v1/subscriptions/${subscription_id}`
    			);
    			return {
    				content: [
    					{ type: "text" as const, text: JSON.stringify(result, null, 2) },
    				],
    			};
    		}
    
    		const result = await client.authPost(
    			`/v1/subscriptions/${subscription_id}/${action}`
    		);
    		return {
    			content: [
    				{ type: "text" as const, text: JSON.stringify(result, null, 2) },
    			],
    		};
    	}
    );

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