Skip to main content
Glama

start_route

Destructive

Create and run a message route that moves data from a source endpoint to a sink endpoint. Supports middlewares, batching, and concurrency, and returns a route name for status, wait, and stop calls.

Instructions

Create and run a route that moves messages from its input (source) endpoint to its output (sink) endpoint, each keyed by connector type. Supports route options like concurrency, batch_size, and exit_on_empty (drain the source then exit; otherwise the route runs continuously until stopped). Either endpoint may carry a middlewares array — retry, dlq, deduplication, limiter, transform, compression, encryption, pack/unpack, buffer, delay, timeout, weak_join, cookie_jar, metrics — e.g. {"sqlx": {...}, "middlewares": [{"retry": {"max_attempts": 3}}]}. concurrency/batch_size may be given inside route or as top-level arguments — the top-level argument wins, and an unset value becomes the app default (4 / 1024, or the batch size the output endpoint's schema declares). Returns the route name for use with wait_route / route_status / stop_route, plus the tuning that took effect.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoOptional unique route name (auto-generated if omitted).
routeYesThe route to run: an `input` (source) endpoint and an `output` (sink) endpoint — each keyed by connector type, e.g. `{"input": {"nats": {"url": "localhost:4222", "subject": "orders"}}, "output": {"file": {"path": "/tmp/out.jsonl"}}}` — plus route options such as `exit_on_empty` (drain the source then exit), `concurrency` and `batch_size`. Use `{"null": null}` as the `output` to discard messages. A `file`/`object_store` source must repeat the `compression`/`encryption` its data was written with — neither is auto-detected, and a mismatch ends the route as `completed` having moved few or no messages rather than failing, so check the moved-message count.
batch_sizeNoBatch size. Overrides `batch_size` inside `route` if both are given; if neither is given, the output endpoint's own schema default applies if it declares one, else the app default (1024), not the library's 512.
concurrencyNoRoute concurrency. Overrides `concurrency` inside `route` if both are given; if neither is given the app default (4) applies, not the library's 1. Higher values parallelize sink writes; sources that read serially do not speed up.
capture_lastNoKeep the last N messages that flow through this route, readable with `route_messages`. Omit (or 0) to capture nothing, which is the default — captured payloads are held in memory and returned to the model verbatim.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.3

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare `readOnlyHint=false` and `destructiveHint=true`, so the writing nature of the tool is covered by structured data. The description adds useful behavior: the route runs continuously until stopped unless `exit_on_empty` is set, and it returns the tuning that took effect. It stops short of disclosing startup failure modes, connection requirements, or what happens to existing routes of the same name.

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?

A single dense paragraph that front-loads the core action before the option/middleware detail. Every sentence carries information, though the middleware enumeration and the worked example make it longer than strictly needed for selection.

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?

No output schema exists, yet the description covers the return value (route name plus the effective tuning). For a 5-parameter tool with deeply nested endpoint configs it is nearly complete, with the only real gap being the `capture_last` parameter, which is left entirely to the schema.

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 schema carries the per-field detail, but the description still adds the cross-field rule (top-level `concurrency`/`batch_size` wins over the in-`route` value, and an unset value becomes the app default 4/1024). It also enumerates the middleware set inline, which helps the agent compose a valid endpoint without drilling into `$defs`.

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+resource pair ('Create and run a route') and immediately scopes it as moving messages from an `input` endpoint to an `output` endpoint. It distinguishes itself from the stop/status siblings by describing the creation-and-run action and returning the route name for use with `wait_route` / `route_status` / `stop_route`.

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 clear lifecycle context: it names the follow-up tools that consume the returned route name, and explains `exit_on_empty` as the toggle between drain-and-exit and continuous operation. It does not, however, state when to prefer this over siblings like `publish` or `generate_cli_command`, and offers no explicit exclusions.

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