Skip to main content
Glama

elenchus_mediator_summary

Retrieve a mediator summary for a session, providing dependency graph statistics, verification coverage, and intervention history to assess code verification progress.

Instructions

Get mediator summary including dependency graph stats, verification coverage, and intervention history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession ID

Implementation Reference

  • The core handler function `getMediatorSummary` that executes the tool logic. It retrieves the mediator state for a session and returns a summary object containing graph stats (nodes, edges, circular deps), coverage stats (total/verified files, rate, unverified critical), and intervention stats (total, by type, last intervention).
    export function getMediatorSummary(sessionId: string): object | null {
      const state = mediatorStates.get(sessionId);
      if (!state) return null;
    
      const totalInterventions = state.interventions.length;
      const byType = new Map<ActiveInterventionType, number>();
      for (const i of state.interventions) {
        byType.set(i.type, (byType.get(i.type) || 0) + 1);
      }
    
      return {
        graphStats: {
          totalNodes: state.graph.nodes.size,
          totalEdges: state.graph.edges.length,
          circularDeps: detectCircularDependencies(state.graph).length
        },
        coverage: {
          totalFiles: state.coverage.totalFiles,
          verifiedFiles: state.coverage.verifiedFiles.size,
          coverageRate: (state.coverage.verifiedFiles.size / state.coverage.totalFiles * 100).toFixed(1) + '%',
          unverifiedCritical: state.coverage.unverifiedCritical.length
        },
        interventions: {
          total: totalInterventions,
          byType: Object.fromEntries(byType),
          lastIntervention: state.interventions[state.interventions.length - 1] || null
        }
      };
    }
  • The exported `mediatorSummary` async function that acts as the MCP tool handler. It receives the validated args (sessionId), delegates to `getMediatorSummary` from the mediator module, and returns the result.
    export async function mediatorSummary(
      args: z.infer<typeof MediatorSummarySchema>
    ): Promise<object | null> {
      return getMediatorSummary(args.sessionId);
    }
  • The Zod schema `MediatorSummarySchema` for input validation. It defines a single required field: `sessionId` (string).
    export const MediatorSummarySchema = z.object({
      sessionId: z.string().describe('Session ID')
    });
  • The tool registration entry. The object `elenchus_mediator_summary` is defined in `mediatorTools` with a description, schema, and handler reference, and is later spread into the global `tools` export in src/tools/index.ts.
    elenchus_mediator_summary: {
      description: 'Get mediator summary including dependency graph stats, verification coverage, and intervention history.',
      schema: MediatorSummarySchema,
      handler: mediatorSummary
    }
Behavior3/5

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

No annotations are provided. The description indicates a read operation (via 'Get') and lists output content, but does not disclose potential side effects, authorization needs, or real-time constraints. It is minimally transparent.

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?

Description is a single concise sentence that immediately states the function and key outputs, with no wasted words.

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

Completeness3/5

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

For a summary tool with one parameter and no output schema, the description covers the basics but omits details like data freshness, scope, or formatting. It is adequate but not comprehensive.

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% (one parameter), but the description adds no meaning beyond the schema's minimal 'Session ID'. Baseline score is 3 due to high coverage, but no additional value.

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?

The description specifies the verb 'Get', resource 'mediator summary', and lists included components (dependency graph stats, verification coverage, intervention history), clearly distinguishing it from sibling tools like 'get_diff_summary' or 'role_summary'.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternative summary tools (e.g., 'elenchus_role_summary'). The description lacks context for when a mediator summary is appropriate.

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/jhlee0409/elenchus-mcp'

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