wave_get_subscription
Retrieve current subscription details including plan, billing cycle, and feature entitlements to manage your account and access streaming capabilities.
Instructions
Get current subscription details including plan, billing cycle, and feature entitlements
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/billing.ts:33-43 (handler)Handler: async function that fetches subscription details from /api/v1/billing/subscription and returns the response body as text content.
server.tool( "wave_get_subscription", "Get current subscription details including plan, billing cycle, and feature entitlements", {}, async () => { const res = await waveFetch("/api/v1/billing/subscription"); if (!res.ok) return errorContent(res.status, res.body); return textContent(res.body); }, ); - src/tools/billing.ts:32-43 (registration)Registration: registerBillingTools function registers 'wave_get_subscription' on the McpServer instance via server.tool().
export function registerBillingTools(server: McpServer): void { server.tool( "wave_get_subscription", "Get current subscription details including plan, billing cycle, and feature entitlements", {}, async () => { const res = await waveFetch("/api/v1/billing/subscription"); if (!res.ok) return errorContent(res.status, res.body); return textContent(res.body); }, ); - src/tools/billing.ts:5-19 (helper)Helper: waveFetch wraps fetch() with auth headers and base URL, used by the handler to call the WAVE API.
async function waveFetch( path: string, init?: RequestInit, ): Promise<{ ok: boolean; status: number; body: string }> { const url = `${getBaseUrl()}${path}`; const res = await fetch(url, { ...init, headers: { ...getAuthHeaders(), ...init?.headers, }, }); const body = await res.text(); return { ok: res.ok, status: res.status, body }; } - src/tools/billing.ts:25-30 (helper)Helper: errorContent formats error responses for the MCP tool output.
function errorContent( status: number, body: string, ): { content: Array<{ type: "text"; text: string }> } { return textContent(`Error ${status}: ${body}`); } - src/tools/billing.ts:33-36 (schema)Schema: The tool has an empty schema object {} meaning it takes no input parameters.
server.tool( "wave_get_subscription", "Get current subscription details including plan, billing cycle, and feature entitlements", {},