get_categories
Retrieve job counts categorized by sector with experience level breakdown for entry, mid, and senior positions.
Instructions
Get job counts by category/sector with experience level breakdown (entry, mid, senior).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:1102-1117 (handler)The main handler function that executes the get_categories tool logic. Fetches category data from API client, formats it into a markdown table with category names, total counts, and breakdowns by experience level (entry, mid, senior).
private async getCategories() { const { data } = await this.apiClient.getCategories(); const rows = data.map(c => `| ${c.category} | ${c.count} | ${c.entry_count} | ${c.mid_count} | ${c.senior_count} |` ).join('\n'); return { content: [{ type: 'text', text: `**Job Categories with Experience Breakdown** | Category | Total | Entry | Mid | Senior | |----------|-------|-------|-----|--------| ${rows}`, }], }; } - src/types.ts:82-88 (schema)TypeScript interface defining the structure of category statistics returned by the API, including category name, total count, and counts for each experience level.
export interface CategoryStat { category: string; count: number; entry_count: number; mid_count: number; senior_count: number; } - src/index.ts:606-613 (registration)Tool registration defining the tool name, description, and input schema (no parameters required).
{ name: 'get_categories', description: 'Get job counts by category/sector with experience level breakdown (entry, mid, senior).', inputSchema: { type: 'object', properties: {}, additionalProperties: false } - src/api-client.ts:112-114 (helper)API client helper method that makes the HTTP request to /stats/categories endpoint and returns category statistics data.
async getCategories(): Promise<{ data: CategoryStat[] }> { return this.request('/stats/categories'); }