Skip to main content
Glama
pokutuna

@pokutuna/mcp-chrome-tabs

by pokutuna

Read Tab Content

read_tab_content

Extract readable text content from browser tabs using tab IDs or the active tab. Retrieve specific text sections by setting a starting character position.

Instructions

Get readable content from a tab in the user's browser. Provide ID (from list_tabs output) to read a specific tab, or omit for the active tab.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoTab reference from list_tabs output (e.g: ID:12345:67890). If omitted, uses the currently active tab.
startIndexNoStarting character position for content extraction (default: 0)

Implementation Reference

  • src/mcp.ts:140-163 (registration)
    Registration of the read_tab_content tool, including its schema and definition.
    server.registerTool(
      "read_tab_content",
      {
        title: "Read Tab Content",
        description:
          "Get readable content from a tab in the user's browser. Provide ID (from list_tabs output) to read a specific tab, or omit for the active tab.",
        inputSchema: {
          id: z
            .string()
            .optional()
            .describe(
              "Tab reference from list_tabs output (e.g: ID:12345:67890). If omitted, uses the currently active tab."
            ),
          startIndex: z
            .number()
            .int()
            .nonnegative()
            .optional()
            .default(0)
            .describe(
              "Starting character position for content extraction (default: 0)"
            ),
        },
      },
  • Handler implementation for read_tab_content that fetches tab content and formats it for output.
    async (args) => {
      const { id, startIndex } = args;
      const tab = await getTab(id ? view.parseTabRef(id) : null, options);
      return {
        content: [
          {
            type: "text",
            text: view.formatTabContent(
              tab,
              startIndex,
              options.maxContentChars
            ),
          },
        ],
      };
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It establishes this is a read operation targeting browser content and specifies the tab selection logic. However, it omits details about the return format (plain text vs. HTML vs. structured data), content size limits, or whether the operation affects browser state.

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 well-structured sentences with zero waste. The first sentence front-loads the core purpose; the second provides essential parameter guidance. Every word earns its place—no filler, no redundancy, and no unnecessary verbosity.

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 100% schema coverage for the 2 parameters, the description adequately covers inputs. However, with no output schema provided, the description could be improved by briefly indicating the return format (e.g., extracted text content) to complete the picture for the agent.

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 coverage is 100%, establishing a baseline of 3. The description adds valuable semantic context by specifying that the ID comes from 'list_tabs output,' which helps the agent understand the tool relationship. It does not add significant detail beyond the schema for startIndex or ID format syntax.

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 clearly states the specific action ('Get readable content') and resource ('tab in the user's browser'). It effectively distinguishes from sibling tools by explicitly referencing 'list_tabs output' for the ID parameter, clarifying this reads existing content rather than opening new tabs.

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?

Provides clear guidance on when to provide the ID parameter (to read a specific tab) versus when to omit it (for the active tab). Mentions the dependency on list_tabs for obtaining valid IDs. Lacks explicit 'when not to use' guidance contrasting with open_in_new_tab, though this distinction is relatively clear from the verb choices.

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/pokutuna/mcp-chrome-tabs'

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