Skip to main content
Glama

Screen for AI

Get view state

view_get_state
Read-onlyIdempotent

Reads a bounded state snapshot attributed to a known view revision. A null view_id means the current page; after the screen has moved on (VIEW_NOT_CURRENT or VIEW_NOT_FOUND), the rendered view_id still addresses that page. Retired hosted state returns an explicit error, and a fresh revision restores hosted synchronization. A page that has saved nothing yet returns empty values with state_revision 0. A new revision of the page (the same page_id) starts with no saved answers unless it is sent with these values as initial_state. A phone-owned screen answers only for pages this connection's sender sent; another sender's page returns VIEW_NOT_FOUND. A person can take minutes to answer. Each read is answered by the phone itself and shares its connection with page delivery; reads about ten seconds apart leave room for delivery on slow phones.

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": {
      "device": "<device>"
    },
    "name": "view_get_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
keysNo
deviceYes
view_idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A3.6/5.0
Behavior5/5

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

Well beyond the readOnly/idempotent annotations, it discloses concrete error modes (VIEW_NOT_CURRENT, VIEW_NOT_FOUND, retired hosted state), ownership scoping for phone-owned screens, revision reset behavior, an empty-state case (state_revision 0), and a polling-rate caution because reads share the delivery connection.

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 definition, then progressively narrower caveats, so an agent can stop early. Some sentences are dense and run-on (the connection-sharing and latency guidance in particular), but little is purely redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Return shapes are covered by the output schema, and error/revision semantics are thorough. However, for a tool whose required parameter is 'device', omitting any explanation of what that identifier is and what 'keys' filters is a real completeness gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the parameters, and it only explains view_id (including the null default). The required 'device' parameter and the 'keys' projection array are never mentioned or illustrated, leaving two of three parameters undocumented anywhere.

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?

The description opens with a specific verb and resource ('Reads a bounded state snapshot attributed to a known view revision'), which is far more precise than the title. It does not explicitly contrast with the sibling view_get_events, but 'state snapshot' vs. an events resource is inferable.

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?

It gives situational context (null view_id = current page, stale rendered view_id still addresses its page, what a fresh revision means) but never states when to prefer this over view_get_events or display_get_current. Guidance is implied rather than prescriptive.

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