Skip to main content
Glama

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
NameRequiredDescriptionDefault
chunkIdsYesChunk IDs to retrieve in full

Implementation Reference

  • 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) }],
        };
      },
    );
  • 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'),
    },
  • 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,
        },
      },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/louis49/melchizedek'

If you have feedback or need assistance with the MCP directory API, please join our Discord server