Skip to main content
Glama

elenchus_escalate_tier

Manually promote a code verification session to a higher tier (focused or exhaustive) for deeper adversarial analysis, uncovering security, correctness, and performance issues.

Instructions

Manually escalate to a higher verification tier (screen → focused → exhaustive).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession ID
targetTierYesTarget tier to escalate to: "focused" or "exhaustive"
reasonYesReason for escalation
scopeNoFiles to focus on (if any)

Implementation Reference

  • The handler function for the elenchus_escalate_tier tool. Gets pipeline state, calls escalateTier() from the pipeline module, and returns success/failure with previous and new tier information.
    export async function escalateTierTool(
      args: z.infer<typeof EscalateTierSchema>
    ): Promise<{
      success: boolean;
      previousTier?: VerificationTier;
      newTier?: VerificationTier;
      message: string;
    }> {
      const state = getPipelineState(args.sessionId);
      if (!state) {
        return {
          success: false,
          message: 'No pipeline found for this session'
        };
      }
    
      const previousTier = state.currentTier;
      const success = escalateTier(args.sessionId, args.targetTier, args.reason, args.scope);
    
      if (!success) {
        return {
          success: false,
          previousTier,
          message: `Cannot escalate from ${previousTier} to ${args.targetTier}`
        };
      }
    
      return {
        success: true,
        previousTier,
        newTier: args.targetTier,
        message: `Escalated from ${previousTier} to ${args.targetTier}: ${args.reason}`
      };
    }
  • The core escalateTier() function that performs the actual state mutation: validates the target tier is higher than current, records the escalation, and updates currentTier.
    export function escalateTier(
      sessionId: string,
      targetTier: VerificationTier,
      reason: string,
      scope: string[] = []
    ): boolean {
      const state = pipelineStates.get(sessionId);
      if (!state) return false;
    
      // Using TIER_ORDER constant
      const currentIndex = TIER_ORDER.indexOf(state.currentTier);
      const targetIndex = TIER_ORDER.indexOf(targetTier);
    
      if (targetIndex <= currentIndex) return false;
    
      state.escalations.push({
        fromTier: state.currentTier,
        toTier: targetTier,
        reason,
        files: scope
      });
      state.currentTier = targetTier;
    
      return true;
    }
  • Zod schema for elenchus_escalate_tier input validation: sessionId (string), targetTier (enum: 'focused' | 'exhaustive'), reason (string), and optional scope (array of strings).
    export const EscalateTierSchema = z.object({
      sessionId: z.string().describe('Session ID'),
      targetTier: EscalateTierEnum.describe('Target tier to escalate to: "focused" or "exhaustive"'),
      reason: z.string().describe('Reason for escalation'),
      scope: z.array(z.string()).optional().describe('Files to focus on (if any)')
    });
  • Registration of elenchus_escalate_tier in the pipelineTools object with description, schema, and handler.
    export const pipelineTools = {
      elenchus_get_pipeline_status: {
        description: 'Get current tier pipeline status including completed tiers, escalations, and token usage.',
        schema: GetPipelineStatusSchema,
        handler: getPipelineStatusTool
      },
      elenchus_escalate_tier: {
        description: 'Manually escalate to a higher verification tier (screen → focused → exhaustive).',
        schema: EscalateTierSchema,
        handler: escalateTierTool
      },
      elenchus_complete_tier: {
        description: 'Mark the current tier as complete and check for auto-escalation based on issues found.',
        schema: CompleteTierSchema,
        handler: completeTierTool
      }
    };
  • Tools composition: pipelineTools is spread into the master 'tools' object which is the final MCP tool registry.
    export const tools = {
      ...sessionLifecycleTools,
      ...issueManagementTools,
      ...mediatorTools,
      ...roleTools,
      ...reverifyTools,
      ...diffTools,
      ...cacheTools,
      ...pipelineTools,
      ...safeguardsTools,
      ...optimizationTools,
      ...dynamicRoleTools,
      ...llmEvalTools,
    };
Behavior2/5

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

With no annotations, the description adds minimal behavioral context beyond the tool name; it does not disclose side effects, permissions, or reversibility, which is insufficient for a mutation tool.

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

Conciseness4/5

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

The description is a single concise sentence that efficiently conveys the tool's action, though it lacks structure or additional sections that could be beneficial.

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

Completeness2/5

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

The tool has no output schema and multiple siblings; the description fails to mention return values, side effects, or prerequisites, making it incomplete for an agent to use confidently.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds value by contextualizing the targetTier enum values (screen → focused → exhaustive), clarifying the escalation hierarchy.

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 clearly states the action (manually escalate) and the resource (verification tier), along with the progression from screen to focused to exhaustive, which distinguishes it from sibling tools.

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

Usage Guidelines3/5

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

The description implies when to use (manual escalation) but does not provide explicit guidance on when not to use or mention alternatives, leaving the agent to infer context from sibling names.

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