Skip to main content
Glama
abranson
by abranson

Topmost Window PID

sailfish_device_topmost_pid
Read-onlyIdempotent

Queries Lipstick for the current topmost window process ID, so you can identify the foreground app on a Sailfish OS device.

Instructions

Query Lipstick for the current topmost window process id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceNoConfigured device alias or ssh target. When the user says the device is attached over USB, use 'usb' for the default device or 'usb:<name>' when the user supplies a device name. The USB connection trusts that name for device metadata and does not resolve it through DNS.
timeoutNoCommand timeout in seconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is well covered. The description adds only that the query goes to Lipstick; it does not state the return shape, latency, or what happens when no window is focused, which matters for an openWorld read.

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?

A single short sentence with the key noun phrase (topmost window process id) front-loaded and zero filler. It is appropriately sized, though it is terse enough that more routing context could have been added without bloat.

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?

For a no-arg, read-only query with a fully documented schema and annotations, the description is minimally adequate. With no output schema, it only implicitly signals the return value (a pid) and omits any note about the no-focused-window case, leaving a small gap.

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

Parameters3/5

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

Schema description coverage is 100%, and the schema thoroughly documents both the device alias/USB syntax and the timeout. The description contributes nothing beyond the schema, so the baseline 3 applies.

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 (Query) and resource (topmost window process id) with the source system (Lipstick) named. It is easy to distinguish from device_journal or proc_maps, though the description does not explicitly contrast itself with any sibling.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives such as sailfish_device_proc_maps or sailfish_device_lipstick_screenshot, nor any prerequisite or exclusion stated. Usage must be inferred entirely from the name.

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