Skip to main content
Glama

Escalate if needed

escalate_if_needed

Escalates difficult questions to Cursor, Grok, or Claude through the Frontier helper when a local answer is insufficient, returning the cloud model’s answer and escalation status.

Instructions

Send a hard question to Cursor, Grok or Claude via the Frontier helper. Use ask_frontier for the same call without a reason field. Use identify_handoff_triggers to decide whether to escalate. Calls the network. Needs the matching API key. Returns JSON with escalated, answer and hook_api.

Input Schema

NameRequiredDescriptionDefault
reasonNoOptional reason recorded in the result. Default empty.
providerNoCloud provider: cursor, grok or claude. Default cursor.
questionYesQuestion to send to the cloud model.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv6.2.1
    • addedInput schema / properties / provider / description
      Added value: +"Cloud provider: cursor, grok or claude. Default cursor."
    • addedInput schema / properties / question / description
      Added value: +"Question to send to the cloud model."
    • addedInput schema / properties / reason / description
      Added value: +"Optional reason recorded in the result. Default empty."
  2. Addedv6.2.0

TDQS

A4.8/5.0
Behavior5/5

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

It provides several crucial behavioral details beyond structured fields, including network requirements, necessary credentials ('needs the matching API key'), and the expected output schema elements ('Returns JSON with escalated, answer and hook_api').

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 highly dense with information, successfully integrating purpose, usage boundaries, and environmental constraints into a single paragraph without becoming verbose or repetitive.

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

Completeness5/5

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

Given its complexity and the importance of distinguishing it from ask_frontier and identify_handoff_triggers, the description is exhaustive. It gives the agent all the necessary information (how, why, what to expect, what to avoid) to execute the tool correctly.

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?

While schema coverage is 100%, the description adds semantic value by defining the specific set of acceptable providers (Cursor, Grok, Claude) and explaining the functional role of the 'reason' field within the context of the tool's escalation logic.

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 defines the action ('Send a hard question') and the target resources (Cursor, Grok, Claude via Frontier). It is highly effective at differentiation by explicitly mentioning related tools and their specific use cases.

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

Usage Guidelines5/5

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

The definition acts as a decision tree, telling the user exactly when to use this tool (to include a reason), when *not* to use it (referring to ask_frontier for reason-less calls), and which other tool (identify_handoff_triggers) is responsible for the pre-decision logic.

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