Skip to main content
Glama
MCP Appium

MCP Appium

Official
by appium

appium_get_page_source

Get current-screen XML. saveToFile=true returns server-local path/bytes and enables selector/pattern summaries.

Instructions

Get current-screen XML. saveToFile=true returns server-local path/bytes and enables selector/pattern summaries.

Input Schema

NameRequiredDescriptionDefault
patternNoLiteral tag/attribute substring.
selectorNoXPath selecting elements.
sessionIdNoSession ID; defaults to the active session.
saveToFileNoSave fresh XML to a file; return path/bytes instead of XML.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.97.1
    • addedInput schema / properties / pattern
      Added value: +{
      +  "description": "Literal tag/attribute substring.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / saveToFile
      Added value: +{
      +  "default": false,
      +  "description": "Save fresh XML to a file; return path/bytes instead of XML.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / selector
      Added value: +{
      +  "description": "XPath selecting elements.",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv1.95.0
    • changedInput schema / properties / sessionId / description
      Previous value: -"Session ID to target. If omitted, uses the active session."New value: +"Session ID; defaults to the active session."
  3. First observedv1.92.11

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only give readOnlyHint=false and openWorldHint=false; the description adds real context beyond them by disclosing the save-to-file side effect (server-local path/bytes) that explains the non-read-only hint, and the alternate return format. It stops short of explaining what the 'summaries' contain or any auth/limits.

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?

Two sentences with zero filler; the core purpose is front-loaded and the conditional behavior follows immediately. Nothing is repeated from the title or schema.

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 4-param read tool with no output schema, the description covers the essential return-format split between XML and saved-file path/bytes. It leaves the content/format of the 'selector/pattern summaries' undefined, a minor gap given the otherwise adequate coverage.

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 genuine cross-parameter meaning: it ties saveToFile=true to a different return shape (path/bytes instead of XML) and to activating the selector/pattern summary behavior. That linkage is not derivable from the individual schema descriptions alone.

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 ('Get current-screen XML'), which is distinguishable from siblings like appium_screenshot and appium_find_element. It does not explicitly name or contrast itself with any sibling, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the mention that saveToFile=true enables 'selector/pattern summaries' hints at when to use those params, but there is no explicit when-to-use, when-not-to-use, or named alternative (e.g., appium_find_element) for locating elements.

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