Skip to main content
Glama

Preview dynamic endpoint

preview_dynamic_endpoint
Destructive

Render what a dynamic endpoint serves WITHOUT publishing — runs the endpoint's workflow through the full serve path (input + bound datafile + content-type) and returns the response, so you can preview a DRAFT before publishing (or verify any version). Omit version to preview the latest draft; pass a version to preview that one. For a :param endpoint (e.g. 'post/:slug'), pass sample params (e.g. {"slug":"hello"}) — they run through the definition's input_transform, so you can preview a specific URL and confirm a good value renders and a bad one fails input validation. This executes the workflow (may have side effects). Returns content_type, output (decoded as a string), the run status (status=failed with a message when the render did not succeed), the run_id (drill into the full run/traces with get_workflow_run_traces), and resolved_input (the $input the transform produced, for debugging the mapping).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugNothe endpoint slug (provide this or endpoint_id)
paramsNosample path parameters for a :param endpoint (e.g. {"slug":"hello"} for a 'post/:slug' endpoint); fed to the definition's input_transform to build $input, so you can preview a specific URL and confirm it passes the workflow's input_schema
versionNospecific version to preview; omit (0) for the latest version (the draft)
endpoint_idNothe endpoint id (provide this or slug)
viewer_emailNosimulated viewer's email, bound as auth.email. Only takes effect when the endpoint has a role allowlist (auth.allow.tenant_roles) — that is the only case where a real address reaches a workflow, so a preview without one ignores this, exactly as serving would
viewer_rolesNosimulated viewer's roles in this workspace, bound as auth.roles (e.g. ["ROLE_ADMIN"]) so you can preview role-gated rendering. Like viewer_email, only takes effect on an endpoint with a role allowlist
viewer_user_idNosimulate a signed-in viewer for previewing a gated endpoint that exposes identity: the derived auth.viewer_id is computed from this, so the preview shows the real identifier. Omit it and a visible placeholder stands in. Ignored unless the endpoint gates and exposes identity

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
outputYes
run_idNo
statusYes
messageNo
content_typeYes
resolved_inputNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true/readOnlyHint=false, and the description reinforces this by stating 'This executes the workflow (may have side effects)' rather than hiding it. It also discloses the full serve path (input + datafile + content-type), failure semantics (status=failed with a message), and that params run through input_transform, adding real context beyond the structured fields.

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?

Front-loaded with the core action and constraint, then flows into scope selection and the :param case. It is dense but each sentence carries information; minor redundancy with the schema on return values (content_type, run_id, resolved_input) despite an output schema existing keeps it from a 5.

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 7-param executable tool with side effects, the description covers scope selection, param handling, auth simulation caveats, failure behavior, and where to drill down. An output schema exists, so return-value detail is a bonus rather than a requirement; nothing needed to call it correctly is missing.

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 baseline is 3, but the description adds meaningful semantics: omit-version = latest draft vs. pass-version behavior, params flowing through input_transform to build $input, and the conditional effect of viewer_email/viewer_roles (only on role-allowlisted endpoints) and viewer_user_id (placeholder when omitted). This goes beyond restating field descriptions.

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 (render/preview) and resource (dynamic endpoint), and immediately clarifies the critical distinction: it runs the full serve path WITHOUT publishing. An agent can separate this from publish_dynamic_endpoint and get_dynamic_endpoint without opening the schema.

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?

Explicitly states when to use it (preview a DRAFT before publishing, or verify any version), how to select scope (omit version for latest draft, pass a version for that one), and routes drill-down to the sibling get_workflow_run_traces. Also covers the :param special case and why to pass sample params.

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.

Resources