relentless_index
Retrieve an index of database entries with slugs and titles for navigation or sitemap generation, providing faster access than full content retrieval.
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)Handler for the 'relentless_index' tool. Fetches the index of all entries (slugs and titles) from the specified database via the Relentless API, with optional format parameter.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)Registration of the 'relentless_index' tool in the listTools response, including name, description, and input schema.{ 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 database (required) 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'], },