Skip to main content
Glama

Route a message to a model

route_model
Read-onlyIdempotent

Ask Gumloop Chew which model it would select for a message and why, returning a routing decision without running the chosen model or fallbacks.

Instructions

Ask Gumloop Chew — the model router behind Auto — which model it would use for a given message, and why. Chew is a router, not a model: router is always gumloop-chew, and the concrete model it selected is route.model.

This endpoint returns a decision only. It does not run the selected model or its fallbacks. The routing judgement consumes credits and is bounded by the caller's model access.

Omit models to use the deduplicated union of Chew's lane chains, not every model the caller may use. Restricted candidates can appear with status: "restricted"; they are never selected or included in fallback_models.

Team scope requires actual team membership, even within the same organization. Personal API keys and OAuth are supported; this is not team-key-only. Read operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentNo
inputNo
modelsNo
accountNoNamed private Gumloop account; selects private credentials and user/team identity.
historyNo
payloadNoComplete JSON request body instead of body flags. Preserves current endpoint fields and values.
team_idNoScope model availability and credit attribution to a team the caller belongs to.
payload_fileNoRegular local JSON body file, at most 5 MB. Cannot be mixed with body flags or payload.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed44 schema fields changedv3.0.0
    • addedInput schema / $defs / agent
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Optional context about the agent the message is for. Sharper context produces a sharper route.",
      +  "properties": {
      +    "description": {
      +      "maxLength": 2000,
      +      "type": "string"
      +    },
      +    "name": {
      +      "maxLength": 200,
      +      "type": "string"
      +    },
      +    "system_prompt": {
      +      "maxLength": 20000,
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / $defs / history
      Added value: +{
      +  "description": "Prior turns, oldest first, for context.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "content": {
      +        "description": "Message text, as a string or text parts. `input` and `message` are accepted as aliases.",
      +        "oneOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "items": {
      +              "type": "object"
      +            },
      +            "type": "array"
      +          }
      +        ]
      +      },
      +      "model": {
      +        "description": "The model that produced this turn. Assistant messages only.",
      +        "maxLength": 200,
      +        "type": "string"
      +      },
      +      "role": {
      +        "enum": [
      +          "user",
      +          "assistant"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "role",
      +      "content"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
    • addedInput schema / $defs / input
      Added value: +{
      +  "description": "The message to route. `message` is accepted as an alias. A string or an array of `{type: text, text: ...}` parts.",
      +  "oneOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  ]
      +}
    • addedInput schema / $defs / models
      Added value: +{
      +  "description": "Candidate model IDs to choose between. IDs must be nonempty, unique after remapping, and registered. Omit to use Chew's lane-chain union.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 50,
      +  "minItems": 1,
      +  "type": "array",
      +  "uniqueItems": true
      +}
    • addedInput schema / properties / agent / $ref
      Added value: +"#/$defs/agent"
    • removedInput schema / properties / agent / additionalProperties
      Removed value: -false
    • removedInput schema / properties / agent / description
      Removed value: -"Optional context about the agent the message is for. Sharper context produces a sharper route."
    • removedInput schema / properties / agent / properties
      Removed value: -{
      -  "description": {
      -    "maxLength": 2000,
      -    "type": "string"
      -  },
      -  "name": {
      -    "maxLength": 200,
      -    "type": "string"
      -  },
      -  "system_prompt": {
      -    "maxLength": 20000,
      -    "type": "string"
      -  }
      -}
    • removedInput schema / properties / agent / type
      Removed value: -"object"
    • addedInput schema / properties / history / $ref
      Added value: +"#/$defs/history"
    • removedInput schema / properties / history / description
      Removed value: -"Prior turns, oldest first, for context."
    • removedInput schema / properties / history / items
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "content": {
      -      "description": "Message text, as a string or text parts. `input` and `message` are accepted as aliases.",
      -      "oneOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "items": {
      -            "type": "object"
      -          },
      -          "type": "array"
      -        }
      -      ]
      -    },
      -    "model": {
      -      "description": "The model that produced this turn. Assistant messages only.",
      -      "maxLength": 200,
      -      "type": "string"
      -    },
      -    "role": {
      -      "enum": [
      -        "user",
      -        "assistant"
      -      ],
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "role",
      -    "content"
      -  ],
      -  "type": "object"
      -}
    • removedInput schema / properties / history / maxItems
      Removed value: -20
    • removedInput schema / properties / history / type
      Removed value: -"array"
    • addedInput schema / properties / input / $ref
      Added value: +"#/$defs/input"
    • removedInput schema / properties / input / description
      Removed value: -"The message to route. `message` is accepted as an alias. A string or an array of `{type: text, text: ...}` parts."
    • removedInput schema / properties / input / oneOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "items": {
      -      "type": "object"
      -    },
      -    "type": "array"
      -  }
      -]
    • addedInput schema / properties / models / $ref
      Added value: +"#/$defs/models"
    • removedInput schema / properties / models / description
      Removed value: -"Candidate model IDs to choose between. IDs must be nonempty, unique after remapping, and registered. Omit to use Chew's lane-chain union."
    • removedInput schema / properties / models / items
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / models / maxItems
      Removed value: -50
    • removedInput schema / properties / models / minItems
      Removed value: -1
    • removedInput schema / properties / models / type
      Removed value: -"array"
    • removedInput schema / properties / models / uniqueItems
      Removed value: -true
    • addedInput schema / properties / payload / properties / agent / $ref
      Added value: +"#/$defs/agent"
    • removedInput schema / properties / payload / properties / agent / additionalProperties
      Removed value: -false
    • removedInput schema / properties / payload / properties / agent / description
      Removed value: -"Optional context about the agent the message is for. Sharper context produces a sharper route."
    • removedInput schema / properties / payload / properties / agent / properties
      Removed value: -{
      -  "description": {
      -    "maxLength": 2000,
      -    "type": "string"
      -  },
      -  "name": {
      -    "maxLength": 200,
      -    "type": "string"
      -  },
      -  "system_prompt": {
      -    "maxLength": 20000,
      -    "type": "string"
      -  }
      -}
    • removedInput schema / properties / payload / properties / agent / type
      Removed value: -"object"
    • addedInput schema / properties / payload / properties / history / $ref
      Added value: +"#/$defs/history"
    • removedInput schema / properties / payload / properties / history / description
      Removed value: -"Prior turns, oldest first, for context."
    • removedInput schema / properties / payload / properties / history / items
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "content": {
      -      "description": "Message text, as a string or text parts. `input` and `message` are accepted as aliases.",
      -      "oneOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "items": {
      -            "type": "object"
      -          },
      -          "type": "array"
      -        }
      -      ]
      -    },
      -    "model": {
      -      "description": "The model that produced this turn. Assistant messages only.",
      -      "maxLength": 200,
      -      "type": "string"
      -    },
      -    "role": {
      -      "enum": [
      -        "user",
      -        "assistant"
      -      ],
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "role",
      -    "content"
      -  ],
      -  "type": "object"
      -}
    • removedInput schema / properties / payload / properties / history / maxItems
      Removed value: -20
    • removedInput schema / properties / payload / properties / history / type
      Removed value: -"array"
    • addedInput schema / properties / payload / properties / input / $ref
      Added value: +"#/$defs/input"
    • removedInput schema / properties / payload / properties / input / description
      Removed value: -"The message to route. `message` is accepted as an alias. A string or an array of `{type: text, text: ...}` parts."
    • removedInput schema / properties / payload / properties / input / oneOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "items": {
      -      "type": "object"
      -    },
      -    "type": "array"
      -  }
      -]
    • addedInput schema / properties / payload / properties / models / $ref
      Added value: +"#/$defs/models"
    • removedInput schema / properties / payload / properties / models / description
      Removed value: -"Candidate model IDs to choose between. IDs must be nonempty, unique after remapping, and registered. Omit to use Chew's lane-chain union."
    • removedInput schema / properties / payload / properties / models / items
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / payload / properties / models / maxItems
      Removed value: -50
    • removedInput schema / properties / payload / properties / models / minItems
      Removed value: -1
    • removedInput schema / properties / payload / properties / models / type
      Removed value: -"array"
    • removedInput schema / properties / payload / properties / models / uniqueItems
      Removed value: -true
  2. First observedv2.0.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered. The description still adds real context beyond them: the call consumes credits, it is bounded by the caller's model access, it never executes the selected model or its fallbacks, and restricted candidates surface with status "restricted" but are never selected. Return-shape detail (fallback_models) is thin, keeping it from a 5.

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?

Front-loaded with the core purpose, then decision-only semantics, then parameter caveats. Every paragraph is topical, though the second paragraph's 'Chew is a router, not a model' partially restates the opening line, which costs a little density.

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?

For a decision-only routing endpoint with no output schema, the description supplies the key return contract (router is always gumloop-chew, selected model at route.model, restricted status, fallback_models exclusion) plus auth/scope prerequisites. Nothing an agent needs to call it correctly is missing.

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 50% and 8 parameters exist, so the description must compensate. It clarifies `models` (omit -> lane-chain union rather than every available model) and `team_id` scoping, but leaves `account`, `payload`, and `payload_file` unexplained, and the `models` note largely repeats the schema's own 'Omit to use Chew's lane-chain union'.

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?

States a specific verb and resource ('ask the model router which model it would use') and immediately distinguishes itself from the neighbours: 'Chew is a router, not a model' and 'This endpoint returns a decision only. It does not run the selected model.' An agent can separate this from create_chat_completion or list_models without opening a schema.

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?

Gives concrete usage context: omit `models` to fall back to the lane-chain union, team scope requires actual membership, and personal API keys/OAuth are supported. It never explicitly names an alternative tool or states a when-not-to-use condition (e.g. 'use create_chat_completion to actually run a model'), so it stops short of a 5.

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

Deploy Server

Other Tools