m9k_full
Retrieve complete content of specific conversation chunks by their IDs. Use after search operations to access full context from indexed conversations in the Melchizedek MCP server.
Instructions
Retrieve full content of chunks by IDs. Use after m9k_search to get complete context.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chunkIds | Yes | Chunk IDs to retrieve in full |
Implementation Reference
- src/tools/search.ts:144-155 (handler)Handler function for the m9k_full tool which retrieves full chunk content from the database based on provided IDs.
async ({ chunkIds }) => { const placeholders = chunkIds.map(() => '?').join(','); const stmt = ctx.db.prepare( `SELECT id, session_id, idx, kind, user_content, assistant_content, hash, timestamp, token_count, tags, metadata_json FROM conv_chunks WHERE id IN (${placeholders}) AND deleted_at IS NULL`, ); const rows = stmt.all(...chunkIds); return { content: [{ type: 'text' as const, text: JSON.stringify(rows) }], }; }, ); - src/tools/search.ts:134-136 (schema)Zod input schema definition for the m9k_full tool, validating an array of chunk IDs.
inputSchema: { chunkIds: z.array(z.string()).min(1).max(20).describe('Chunk IDs to retrieve in full'), }, - src/tools/search.ts:129-143 (registration)Registration block for the m9k_full tool using the MCP server instance.
server.registerTool( 'm9k_full', { description: 'Retrieve full content of chunks by IDs. Use after m9k_search to get complete context.', inputSchema: { chunkIds: z.array(z.string()).min(1).max(20).describe('Chunk IDs to retrieve in full'), }, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, },