Skip to main content
Glama

upsert_page_context

Create or fully replace a page playbook.

`context` is the page background the **server** injects for the agent — write "who lands on
this page, what they are deciding, what they usually worry about"; do NOT write facts like
prices or quotas (those belong in a knowledge base, which also ranks higher in authority).

`url_pattern` is a glob (`*/pricing`, `*/solutions/*`), matches the path only, ignores query
strings and trailing slashes; without it the page must report the key explicitly. Resolution
order: explicit key > url_pattern > default.
`greeting_mode="generated"` produces the greeting and suggested questions on the fly in the
visitor's language (recommended); `"static"` uses your fixed `greeting` / `questions`.

**This is a full replace**: fields you don't pass fall back to defaults rather than staying
as they are. To change one field, `list_page_contexts` first, merge, then send.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
labelNo
contextNo
greetingNo
positionNo
questionsNo
is_defaultNo
url_patternNo
greeting_modeNogenerated

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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?

With no annotations provided, the description carries full behavioral burden and excels. It discloses full-replace defaults, url_pattern path-only matching with query/trailing-slash behavior, resolution order, and greeting_mode generation behavior.

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?

The description is dense but well-organized, front-loaded with the core purpose, and uses backticks for parameters. Every sentence adds critical value—no fluff, with clear separations for context, url_pattern, and full-replace warnings.

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 9-parameter tool, the description covers the complex behaviors fully (full-replace, resolution order, glob syntax, greeting modes). Minor gaps remain for label/position/is_default semantics, but an output schema exists to handle return values.

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?

The schema has zero descriptive coverage, so the description compensates for key, context, url_pattern, greeting_mode, greeting, and questions. However, label, position, and is_default are not explained, leaving those parameters underspecified.

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?

The description opens with 'Create or fully replace a page playbook,' which clearly states the action and resource. It distinguishes this upsert from partial updates and references sibling list_page_contexts for the merge workflow.

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 instructs when to use the tool vs alternatives: 'To change one field, list_page_contexts first, merge, then send.' Also provides when-not guidance ('do NOT write facts like prices') and explains url_pattern matching behavior and greeting_mode selection.

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