get_case_queues
List all case queues in your Sprout Social account to organize and manage customer support cases.
Instructions
List all case queues in your Sprout Social account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:160-168 (registration)Registration and handler for the 'get_case_queues' tool. It is registered via server.tool() with an empty schema (no parameters). The handler calls sproutRequest('GET', '/metadata/customer/queues') and returns the result as text content.
server.tool( "get_case_queues", "List all case queues in your Sprout Social account.", {}, async () => { const data = await sproutRequest("GET", "/metadata/customer/queues"); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } ); - src/index.ts:164-167 (handler)The handler function that executes the tool logic. It makes a GET request to '/metadata/customer/queues' using the sproutRequest helper, then returns the JSON response formatted as text content.
async () => { const data = await sproutRequest("GET", "/metadata/customer/queues"); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - src/index.ts:29-59 (helper)The sproutRequest helper function used by get_case_queues to make authenticated API calls to the Sprout Social API. It prepends the customer ID to the path and adds the Bearer token header.
async function sproutRequest( method: "GET" | "POST", path: string, body?: Record<string, unknown> ): Promise<unknown> { const { apiKey, customerId } = getConfig(); const url = `${SPROUT_API_BASE}/v1/${customerId}${path}`; const headers: Record<string, string> = { Authorization: `Bearer ${apiKey}`, Accept: "application/json", }; const options: RequestInit = { method, headers }; if (body) { headers["Content-Type"] = "application/json"; options.body = JSON.stringify(body); } const response = await fetch(url, options); if (!response.ok) { const errorText = await response.text(); throw new Error( `Sprout Social API error (${response.status}): ${errorText}` ); } return response.json(); } - src/index.ts:163-163 (schema)The input schema for get_case_queues is an empty object, meaning no parameters are required or accepted.
{},