Skip to main content
Glama

m9k_context

Retrieve surrounding conversation chunks to understand context and flow after search results, helping analyze dialogue sequences within sessions.

Instructions

Get a chunk with surrounding context (adjacent chunks in the same session). Use after m9k_search to understand the conversation flow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chunkIdYesThe chunk ID to get context for
windowNoNumber of chunks before/after to include

Implementation Reference

  • Tool definition and handler for m9k_context within registerSearchTools.
    server.registerTool(
      'm9k_context',
      {
        description:
          'Get a chunk with surrounding context (adjacent chunks in the same session). Use after m9k_search to understand the conversation flow.',
        inputSchema: {
          chunkId: z.string().describe('The chunk ID to get context for'),
          window: z
            .number()
            .int()
            .min(1)
            .max(10)
            .default(3)
            .describe('Number of chunks before/after to include'),
        },
        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