Skip to main content
Glama

Add a gateway route

portal_route_add
Idempotent

Route a private HTTP or file app to a stable gateway port and scope access to specific people, without inviting users or restarting the gateway.

Instructions

Route a private HTTP or file app on a stable gateway port. Makes the app people-scoped. HTTP MCP requires the current portal owner, checked in the write transaction. The same-origin gate defaults on. Does not invite anyone or restart the gateway node.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "app": "<app>"
    },
    "name": "portal_route_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYes
portNo
allow_cross_originNoAllow browser calls from other origins; default false.

Output Schema

NameRequiredDescriptionDefault
portalYes
routesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.0
    • addedOutput schema / properties / portal / properties / message
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / portal / properties / unavailable_apps
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations (idempotent, non-destructive, non-readonly), the description discloses key behavioral traits: it makes the app people-scoped, HTTP MCP requires the current portal owner checked in the write transaction, and the same-origin gate defaults on. It also clarifies what the tool does not do (invite people, restart the gateway node). It stops short of describing existing-route handling or error behavior, but annotations already cover idempotency and safety.

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?

The description is five tight sentences, front-loaded with the core purpose and followed by scoping, auth, default, and exclusion details. Every sentence adds useful information without repetition.

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?

For a mutation tool with an output schema and annotations covering idempotency and safety, the description supplies the important prerequisites, defaults, side effects, and exclusions an agent needs. The main remaining gaps are explicit sibling routing (list/remove) and clearer parameter semantics for app and port.

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 description coverage is only 33%, so the description should compensate. It gives meaning to the app and port concepts ('private HTTP or file app on a stable gateway port') and reinforces the allow_cross_origin default ('same-origin gate defaults on'), but it does not explain the expected format of the required app identifier or how port selection works, leaving meaningful gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action and resource: routing a private HTTP or file app on a stable gateway port, and making the app people-scoped. It is clearly not a generic 'add' and its exclusions ('does not invite anyone or restart the gateway node') differentiate it from adjacent sibling actions, though it does not name specific sibling tools like portal_route_list or portal_route_remove.

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?

Usage context is implied by 'Route a private HTTP or file app on a stable gateway port' and strengthened by the exclusions ('Does not invite anyone or restart the gateway node'). However, it never explicitly names the alternative tools (portal_route_list, portal_route_remove) or states when to choose this tool versus other portal tools, leaving routing guidance to inference.

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