list_categories
Retrieves all sales tool categories with descriptions and tool counts from the Salestools Club registry.
Instructions
List all available sales tool categories with descriptions and tool counts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:190-202 (handler)The handler function that executes the list_categories tool logic. It fetches categories from the API and formats them with name, tool count, and description.
async function handleListCategories() { try { const data = await fetchJSON(`${BASE_URL}/api/categories`); let text = `# Sales Tool Categories\n\n`; for (const cat of data.categories) { text += `- **${cat.name}** — ${cat.toolCount} tools\n`; text += ` ${cat.description}\n\n`; } return { content: [{ type: "text", text: text.trim() }] }; } catch (error) { return { content: [{ type: "text", text: `Failed to fetch categories: ${error.message}` }] }; } } - index.js:285-288 (schema)The tool schema definition for list_categories, registered in the ListToolsRequestSchema handler. It has no required parameters.
{ name: "list_categories", description: "List all available sales tool categories with descriptions and tool counts.", inputSchema: { type: "object", properties: {} }, - index.js:311-311 (registration)The routing/case statement in the CallToolRequestSchema handler that dispatches 'list_categories' to handleListCategories().
case "list_categories": return handleListCategories();