Skip to main content
Glama

Deploy PR demo

deploy_pr_demo
Destructive

Deploy a throwaway, time-limited demo of an Application's pull-request build into an isolated ankra-demo-pr- namespace on the organisation's staging cluster. Every recorded component is deployed as its own Deployment + Service running the PR's container image tag: the entry component owns the preview host's root path and the others are routed under path prefixes on the same host (the application's saved demo routing when it declares one, else the frontend-shaped component at / and a single API-shaped sibling at /api). A public Ingress is rendered when the organisation has a demo domain configured or the staging cluster has an active DNS zone - the resolved public URL is returned as preview_url (empty when the demo stays in-cluster-only). The answer lists every deployed component under components[] with its image, container_port and ingress_path; the top-level image and service describe the entry component only. Environment variables merge over the Application's saved demo defaults; values may carry ${SECRET_SLOT:} sentinels (resolved server-side, mounted via a Kubernetes Secret) and, when the database is enabled, ${{ ankra.demo_database.url|host|port|name|user|password }} placeholders resolving to a throwaway per-demo Postgres. Safe in ask mode: the demo is isolated in its own namespace and the reaper deletes it at TTL, so it cannot affect existing deployments. Requires a configured staging cluster, application_id, pr_number, and image_tag (the tag the PR build pushed).

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": {
      "application_id": "<application_id>",
      "pr_number": "<pr_number>",
      "image_tag": "<image_tag>"
    },
    "name": "deploy_pr_demo"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNoExtra environment variables for the demo container as a name-to-value object. Values may carry ${SECRET_SLOT:<uuid>} sentinels (treated as secret and mounted via a Kubernetes Secret) and, when database is enabled, ${{ ankra.demo_database.* }} placeholders. Merged over the Application's saved demo env defaults; these win by name.
databaseNoProvision a throwaway Postgres (random per-demo password, deleted with the demo) inside the demo namespace and enable the ${{ ankra.demo_database.* }} placeholders. Overrides the Application's saved default.
image_tagYesThe container image tag the PR head build pushed (appended to the Application's container image URL).
pr_numberYesThe pull-request number; names and isolates the demo namespace.
application_idYesThe Application to deploy a PR demo of.
container_portNoThe port the entry component's container listens on (defaults to that component's Dockerfile EXPOSE port, or 8080 when none is declared).
entry_componentNoThe component that owns the preview host's root path on a multi-component application; the other components keep their path prefixes. Omit to use the application's saved demo routing, then the heuristic (frontend-shaped component, else the primary one). A name that is not a recorded component is refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing lifetime (reaped at TTL), blast radius (own namespace, cannot affect existing deployments), what is created (Deployment + Service per recorded component, optional Ingress, optional throwaway Postgres), and how secrets and database placeholders are resolved server-side. The annotations only say non-read-only, non-idempotent, destructive; the description supplies the actual operational consequences an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose and namespace are front-loaded, which is good, but the body is a single dense paragraph packing routing, env merging, secret sentinels, database placeholders, return shape, and safety into long compound sentences. The return-shape sentences (components[], top-level image/service describing the entry component only) could be tightened, and the block would read faster broken into short labeled sections.

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 complex mutation tool with seven parameters, a nested env object, and no output schema, the description covers prerequisites, namespace isolation, routing and Ingress resolution, env/database semantics, and the returned preview_url and components[] shape. An agent has everything needed to call it correctly and interpret the result without guessing.

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 baseline already carries each parameter, but the description adds real meaning: env merges over saved demo defaults and these win by name, ${SECRET_SLOT:<uuid>} sentinels become Kubernetes Secrets, and ${{ ankra.demo_database.* }} placeholders resolve only when the database is enabled. It also explains the entry_component fallback chain (saved routing, then frontend-shaped heuristic) and that an unrecorded name is refused.

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 (deploy a throwaway, time-limited PR demo) plus the exact placement (isolated ankra-demo-pr-<n> namespace on the staging cluster). The routing model, per-component Deployments/Services, and the distinction from a normal deploy are all made explicit, so an agent can tell this apart from redeploy_demo or deploy_application without opening any 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 clear preconditions (a configured staging cluster, application_id, pr_number, and image_tag from the PR build) and states it is safe to run in ask mode because the demo is namespaced and reaped at TTL. It does not explicitly route the agent to alternatives such as redeploy_demo, demo_stop, or inspect_demo, nor state when not to use it, so it stops short of full when/when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.