Skip to main content
Glama
Purgatory (p7y)
by csakaszamok

app_ticket

Creates a one-time 60-second URL that opens a sandbox's non-public app as its owner, returning a ticket that sets a one-hour sign-in cookie for that app.

Instructions

A one-time URL that opens one of the sandbox's own non-public apps

For an app labelled p9m.access: domain or owner, which otherwise sends you to the browser sign-in. Body: { app: the app's address, e.g. https://shop-web.example.com/path }. Answers { url, expires_in: 60 }: the URL works once, for 60 seconds, and sets a cookie for that app's address that lasts 1 hour. Open it with a cookie file outside the project folder, never inside it (it opens the app as its owner for an hour and must not end up in a commit): jar=$(mktemp); curl -sf -c "$jar" -L "<url>" >/dev/null, then call the app with curl -b "$jar" …, and rm -f "$jar" when done (or open the URL in a browser). The app sees the sandbox's owner in X-P9m-User. Only the sandbox's owner may ask, for its own apps; a public app needs no ticket (404). HTTP POST /sandboxes/{name}/app-ticket

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": {
      "name": "<name>",
      "app": "<app>"
    },
    "name": "app_ticket"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYesThe app's address (or its host)
nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.21.4

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the one-time URL, the 60-second expiry, the 1-hour cookie lifetime and scope, the X-P9m-User identity header, the ownership restriction, the 404 behavior for public apps, and the response shape {url, expires_in}. It also warns that the cookie file must live outside the project folder to avoid committing it.

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?

Purpose and eligibility are front-loaded, then request body, response, and the safe-usage recipe follow in a logical order. Some sentences are dense run-ons, but the curl recipe and the 'never inside the project folder' warning justify their length because they encode a safety constraint.

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 two-parameter tool with no output schema, the description covers response shape, expiry semantics, auth restrictions, and error behavior. The one gap is the undocumented `name` parameter, so an agent still has to infer that it is the sandbox identifier.

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%: `app` is described in the schema, and the description adds a useful concrete example format (https://shop-web.example.com/path) and notes the host alternative. The `name` parameter is never explained in the description; the endpoint template /sandboxes/{name}/ only implicitly suggests it is the sandbox name, so half the parameters remain dependent on inference.

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?

Opens with a precise verb+resource: a one-time URL that opens one of the sandbox's own non-public apps. It further bounds the case ('For an app labelled p9m.access: domain or owner, which otherwise sends you to the browser sign-in') and contrasts it with the public-app case (404, no ticket needed), so an agent can distinguish it from any generic sandbox access tool.

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?

States both the use case (non-public app that would otherwise force browser sign-in) and the exclusion (a public app needs no ticket, returns 404). It also gives the prerequisite that only the sandbox's owner may ask and only for its own apps, plus a concrete invocation recipe with curl, which is more than enough to select and use it correctly.

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