Skip to main content
Glama

pilot_frames

Lists all iframes on a webpage to enable context switching for browser automation tasks.

Instructions

List all frames (iframes) on the page. Use pilot_frame_select to switch context into an iframe for snapshot/interaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'pilot_frames' tool.
    async () => {
      await bm.ensureBrowser();
      try {
        const frames = await bm.listFrames();
        if (frames.length <= 1) {
          return { content: [{ type: 'text' as const, text: '(no iframes — only the main frame)' }] };
        }
        const activeFrame = bm.getActiveFrame();
        const page = bm.getPage();
        const allFrames = page.frames();
        const text = frames.map(f => {
          const isCurrent = allFrames[f.index] === activeFrame;
          const marker = isCurrent ? '→ ' : '  ';
          const label = f.isMain ? '[main]' : `[iframe${f.name ? ` name="${f.name}"` : ''}]`;
          return `${marker}[${f.index}] ${label} ${f.url}`;
        }).join('\n');
        return { content: [{ type: 'text' as const, text }] };
      } catch (err) {
        return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
      }
    }
  • Registration of the 'pilot_frames' tool.
    server.tool(
      'pilot_frames',
      'List all frames (iframes) on the page. Use pilot_frame_select to switch context into an iframe for snapshot/interaction.',
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. While it clarifies the workflow relationship with pilot_frame_select (implying this tool does not itself switch context), it omits disclosure of the return format (what properties describe each frame?) and safety properties (idempotency, side effects) that annotations would normally cover.

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 wasted words. The first sentence front-loads the core functionality definition. The second sentence immediately provides actionable workflow guidance. Every element earns its place with no redundancy or filler.

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?

Given zero parameters (fully described by empty schema) and no output schema, the description provides sufficient context for a simple inspection tool. It adequately explains the tool's role in the iframe interaction workflow. A minor gap exists regarding the specific structure of the returned frame list (IDs, names, etc.), but this is acceptable for the low complexity.

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 input schema defines zero parameters. According to the rubric baseline, zero-parameter tools receive a baseline score of 4. The description appropriately does not invent parameter documentation where none exist, though it could theoretically describe implicit parameters (like 'current page'), which are absent.

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 provides a specific verb ('List'), clear resource ('frames (iframes)'), and scope ('on the page'). The parenthetical clarification of 'frames' as 'iframes' is precise, and the second sentence distinguishes this tool from its sibling 'pilot_frame_select' by clarifying this tool detects frames while the sibling switches into them.

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?

Excellent explicit guidance is provided: 'Use pilot_frame_select to switch context into an iframe for snapshot/interaction.' This establishes the clear workflow sequence (list first, then select) and explicitly names the alternative tool for the next step, preventing confusion between the discovery and selection operations.

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/TacosyHorchata/Pilot'

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