Skip to main content
Glama

Set up a surface on a page

surface_setup

The way to add a surface to a page, in one step: the content fields it swaps, the goals it optimizes, and the variants — with the integration bundle deployed. Returns the install guide for adding the snippet to that page. Ask the user to choose the fields, goals and variants first; the new_surface prompt walks through it. Prefer data-attribute selectors such as [data-surface-field="headline"], added to the page source. Variants go live as soon as the snippet is deployed. Counts toward the plan's surface limit; a name already used in the organization is rejected.

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>",
      "page_url": "<page_url>",
      "fields": "<fields>",
      "goals": "<goals>",
      "variants": "<variants>"
    },
    "name": "surface_setup"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesUnique within the organization.
goalsYesWhat success looks like; the first is the one the bandit optimizes.
fieldsYesPage elements each variant replaces.
page_urlYesThe live URL of the page.
variantsYesExactly one is the control: the page's current copy, setting every field.
descriptionNoOptional note shown in the dashboard.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / description / description
      Added value: +"Optional note shown in the dashboard."
    • addedInput schema / properties / fields / items / properties / description / description
      Added value: +"What the field is, e.g. Hero headline."
    • addedInput schema / properties / goals / items / properties / dom_event / description
      Added value: +"click for a button or link, submit for a form."
    • addedInput schema / properties / variants / items / properties / is_control / description
      Added value: +"True for the control only."
  2. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Adds real behavioral context beyond the annotations: it returns an install guide, variants go live as soon as the snippet is deployed, the call counts toward the plan's surface limit, and a duplicate name in the organization is rejected. What it does not cover is permission/auth requirements, rollback or what happens to partially created state on failure for a non-idempotent mutation.

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?

A single dense paragraph that front-loads the purpose, then behavior, then parameter guidance, then limits. Every sentence carries information – no restatement of the title and no filler.

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 six-parameter, five-required mutation with nested variant objects and no output schema, the description covers purpose, prerequisites, side effects, quota limits and the returned install guide. Only failure/rollback semantics and permission requirements are left implicit.

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 still adds meaning: it frames fields as elements each variant replaces, goals as what success looks like, and variants as the control-plus-alternatives set to choose. It also gives selector-style guidance (prefer [data-surface-field=...]) that the schema does not state as a preference.

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: 'the way to add a surface to a page, in one step', and enumerates the constituents (fields, goals, variants, integration bundle deployed). It is clearly a creation tool, distinguishable in spirit from surface_update or variant_create, though it never names a sibling or explicitly excludes one.

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 a concrete precondition workflow: 'Ask the user to choose the fields, goals and variants first; the new_surface prompt walks through it', and recommends data-attribute selectors for the page source. It lacks explicit 'use X instead when...' routing against siblings, but the when-to-use context is clear.

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