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 chosen people; same-origin protection defaults on.

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.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
portalYes
routesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare this a non-destructive, idempotent write; the description goes beyond them by disclosing that HTTP MCP requires the current portal owner and that this is validated in the write transaction, plus that the same-origin gate is on by default. That authorization detail is exactly the kind of extra context the annotations cannot convey. It still doesn't say what happens on an existing route for the same app/port.

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?

Five short sentences, front-loaded with what the tool does before the constraints and exclusions. Dense and largely waste-free, though the telegraphic phrasing ('HTTP MCP requires the current portal owner') costs some readability.

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?

An output schema exists, so return values need no explanation, and annotations cover the safety profile. The description supplies the missing permission and scoping context for a mutation tool. Remaining gap is parameter detail for app and port, which is the weakest area of an otherwise complete definition.

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 only 33% — app and port have no schema descriptions at all — so the description must carry extra weight. It partially compensates: 'private HTTP or file app' hints at what app identifies, 'stable gateway port' implies the port persists across restarts, and the same-origin default restates allow_cross_origin. It gives no format, range, or auto-assignment guidance for port, so real gaps remain.

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?

States a specific verb and resource — routing a private HTTP or file app onto a stable gateway port — and adds the side effect that the app becomes people-scoped. Sibling separation is only implicit (it rules out invite_user and app_restart by negation) rather than naming portal_route_remove or portal_route_list, so it stops short of a 5.

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?

It gives clear context for when this applies (a private HTTP or file app that needs a stable gateway port and people-scoping) and two explicit exclusions: it does not invite anyone and does not restart the gateway node. It never names an alternative tool to use instead, so it falls short of the 5 bar for explicit alternatives.

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