Skip to main content
Glama
getcustomaise

customaise

Official

get_page_context

Idempotent

Get a DOM snapshot of the current page to understand its layout before writing userscripts. It saves the snapshot to a file by default and returns a summary plus path to keep context window small.

Instructions

Get a DOM snapshot of the current page including URL, title, page structure, and visible elements. Use this to understand the page layout before writing userscripts that manipulate it. WRITES A FILE by default: the full snapshot goes to .customaise/page-context.json in your workspace and this call returns a summary plus the path, so a large page does not fill your context window. Read the file with view_file or grep_search. If you have no filesystem tool, pass output: "inline" to get the whole snapshot in the response and write nothing to disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdNoTab ID to inspect. Defaults to the active tab.
outputNoWhere the full payload goes. "file" (default) writes it to .customaise/ in your workspace and returns a summary plus the path, which keeps a large payload out of your context window. "inline" writes nothing and returns the whole payload in this response. Use it when you have no filesystem tool to read the file with, such as a chat client. "auto" follows the CUSTOMAISE_MCP_OUTPUT environment variable, falling back to "file".
Behavior5/5

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

The description fully discloses the non-obvious side effect that contradicts what 'get' suggests: 'WRITES A FILE by default' to .customaise/page-context.json, returns only a summary plus path, and explains why (keeping large payloads out of the context window). It also gives the recovery path (view_file/grep_search, or output: "inline" to write nothing). This aligns with readOnlyHint=false and adds context beyond what annotations provide, with no contradiction.

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?

The description is about 90 words and front-loads the core purpose before the caveats. Each sentence earns its place: what, when, side effect, path, and fallback. The 'WRITES A FILE' emphasis is effective at flagging the side effect, though behavior of the output parameter is described both here and in the schema, adding slight redundancy.

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?

With no output schema, the description carries the burden of explaining the return contract, and it does: summary plus path by default, full snapshot for 'inline', exact file location, and how to read it. The only minor gap is that it doesn't describe the structure or size of the snapshot file itself, which could matter for very large pages.

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. The description adds value beyond the schema by explaining how to consume the file output ('Read the file with view_file or grep_search') and the scenario justifying the 'inline' mode (chat client without filesystem tool), enriching the output parameter semantics.

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 uses a specific verb and resource: 'Get a DOM snapshot of the current page including URL, title, page structure, and visible elements.' This clearly distinguishes it from siblings like get_console_context (console vs page) and get_selected_elements (selection vs whole page), so an agent can tell them apart without opening schemas.

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?

The description gives clear usage context: 'Use this to understand the page layout before writing userscripts that manipulate it.' It also offers conditional routing guidance ('If you have no filesystem tool, pass output: "inline"'), but it does not explicitly name alternatives or state when not to use this tool versus sibling inspection tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/getcustomaise/customaise-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server