relentless_index
Get a fast index of all database entries with slugs and titles for navigation or sitemap generation without retrieving full content.
Instructions
Get an index of all entries (slugs and titles only). This is faster than relentless_list when you only need to see what entries exist without their full content. Useful for navigation or sitemap generation.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | The database name (e.g., "blog", "docs", "leads") | |
| format | No | Return format: "array" returns [{slug, title, url}], "object" returns {slug: {title, url}} | array |
Implementation Reference
- src/index.ts:480-502 (handler)The handler for the 'relentless_index' tool. Validates input, constructs the Relentless API endpoint (/db/{database}/index with optional format query), fetches data using relentlessRequest helper, and returns the result as formatted JSON text content.case 'relentless_index': { const { database, format = 'array' } = args as { database: string; format?: string } if (!database) { throw new McpError(ErrorCode.InvalidParams, 'Missing required parameter: database') } console.error(`[${new Date().toISOString()}] Getting index for ${database}`) const endpoint = `${RELENTLESS_API_BASE}/api/v1/public/db/${database}/index${ format !== 'array' ? `?format=${format}` : '' }` const result = await relentlessRequest(endpoint) return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], } }
- src/index.ts:279-300 (registration)Tool registration in the listTools handler, defining name, description, and input schema for MCP tool discovery.{ name: 'relentless_index', description: 'Get an index of all entries (slugs and titles only). This is faster than relentless_list when you only need to see what entries exist without their full content. Useful for navigation or sitemap generation.', inputSchema: { type: 'object', properties: { database: { type: 'string', description: 'The database name (e.g., "blog", "docs", "leads")', }, format: { type: 'string', enum: ['array', 'object'], description: 'Return format: "array" returns [{slug, title, url}], "object" returns {slug: {title, url}}', default: 'array', }, }, required: ['database'], }, },
- src/index.ts:283-299 (schema)Input schema definition for the relentless_index tool, specifying parameters for database and optional format.inputSchema: { type: 'object', properties: { database: { type: 'string', description: 'The database name (e.g., "blog", "docs", "leads")', }, format: { type: 'string', enum: ['array', 'object'], description: 'Return format: "array" returns [{slug, title, url}], "object" returns {slug: {title, url}}', default: 'array', }, }, required: ['database'], },