Skip to main content
Glama

m9k_context

Read-onlyIdempotent

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,
        },
      },
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate read-only, idempotent, non-destructive operations. Description adds valuable behavioral context: 'adjacent chunks' clarifies the spatial relationship of returned data, and 'in the same session' defines the boundary scope. No contradictions with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero waste. First sentence defines the operation and scope; second sentence establishes the workflow context. Every word earns its place with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Appropriately complete for a simple 2-parameter read tool with full schema coverage and good annotations. Describes the operation, workflow relationship, and intent. Minor gap: could mention behavior on invalid chunkId, but acceptable given no output schema and read-only safety.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. Description reinforces parameter concepts by using 'surrounding context' and 'adjacent chunks' which align semantically with the 'window' parameter (before/after), but does not add concrete syntax, formats, or examples beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses specific verb 'Get' with clear resource ('chunk with surrounding context') and scope ('adjacent chunks in the same session'). It effectively distinguishes from sibling m9k_search by establishing the workflow relationship ('Use after m9k_search'), clarifying that search finds chunks while this retrieves contextual neighbors.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit workflow guidance ('Use after m9k_search') and clear intent ('understand the conversation flow'), establishing when to use this tool in the sequence. Lacks explicit 'when not to use' exclusions, but the positive guidance is strong and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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