Skip to main content
Glama

Get visible page text

browser_visible_text
Read-onlyIdempotent

Extract visible text from a specified semantic or CSS locator, including iframe chains, on a single page within a session. Isolates content to that page and session for targeted inspection.

Instructions

Read visible text from a semantic or CSS locator on one explicitly addressed page. A locator may select the top document or a bounded outer-to-inner semantic iframe chain; the lookup remains confined to that page and session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYes
locatorYes
sessionIdYes
timeoutMsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
pageIdYes
sessionIdYes
truncationYes
operationIdYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed29 schema fields changedv0.2.1
    • addedInput schema / $defs
      Added value: +{
      +  "shared0": {
      +    "description": "Top document or a bounded outer-to-inner chain of semantic iframe element selectors",
      +    "oneOf": [
      +      {
      +        "properties": {
      +          "kind": {
      +            "const": "main",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "kind"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "chain": {
      +            "items": {
      +              "oneOf": [
      +                {
      +                  "properties": {
      +                    "exact": {
      +                      "default": true,
      +                      "type": "boolean"
      +                    },
      +                    "name": {
      +                      "type": "string"
      +                    },
      +                    "strategy": {
      +                      "const": "role",
      +                      "type": "string"
      +                    },
      +                    "value": {
      +                      "$ref": "#/$defs/shared1"
      +                    }
      +                  },
      +                  "required": [
      +                    "strategy",
      +                    "value"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "properties": {
      +                    "strategy": {
      +                      "$ref": "#/$defs/shared2"
      +                    },
      +                    "value": {
      +                      "minLength": 1,
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "strategy",
      +                    "value"
      +                  ],
      +                  "type": "object"
      +                }
      +              ]
      +            },
      +            "maxItems": 5,
      +            "minItems": 1,
      +            "type": "array"
      +          },
      +          "kind": {
      +            "const": "iframe",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "kind",
      +          "chain"
      +        ],
      +        "type": "object"
      +      }
      +    ]
      +  },
      +  "shared1": {
      +    "enum": [
      +      "button",
      +      "link",
      +      "textbox",
      +      "checkbox",
      +      "radio",
      +      "combobox",
      +      "heading",
      +      "listitem",
      +      "option",
      +      "tab"
      +    ],
      +    "type": "string"
      +  },
      +  "shared2": {
      +    "enum": [
      +      "text",
      +      "label",
      +      "placeholder",
      +      "testId",
      +      "css"
      +    ],
      +    "type": "string"
      +  }
      +}
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / locator / oneOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "exact": {
      -        "default": true,
      -        "type": "boolean"
      -      },
      -      "frame": {
      -        "description": "Top document or a bounded outer-to-inner chain of semantic iframe element selectors",
      -        "oneOf": [
      -          {
      -            "properties": {
      -              "kind": {
      -                "const": "main",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "kind"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "chain": {
      -                "items": {
      -                  "oneOf": [
      -                    {
      -                      "properties": {
      -                        "exact": {
      -                          "default": true,
      -                          "type": "boolean"
      -                        },
      -                        "name": {
      -                          "type": "string"
      -                        },
      -                        "strategy": {
      -                          "const": "role",
      -                          "type": "string"
      -                        },
      -                        "value": {
      -                          "enum": [
      -                            "button",
      -                            "link",
      -                            "textbox",
      -                            "checkbox",
      -                            "radio",
      -                            "combobox",
      -                            "heading",
      -                            "listitem",
      -                            "option",
      -                            "tab"
      -                          ],
      -                          "type": "string"
      -                        }
      -                      },
      -                      "required": [
      -                        "strategy",
      -                        "value"
      -                      ],
      -                      "type": "object"
      -                    },
      -                    {
      -                      "properties": {
      -                        "strategy": {
      -                          "enum": [
      -                            "text",
      -                            "label",
      -                            "placeholder",
      -                            "testId",
      -                            "css"
      -                          ],
      -                          "type": "string"
      -                        },
      -                        "value": {
      -                          "minLength": 1,
      -                          "type": "string"
      -                        }
      -                      },
      -                      "required": [
      -                        "strategy",
      -                        "value"
      -                      ],
      -                      "type": "object"
      -                    }
      -                  ]
      -                },
      -                "maxItems": 5,
      -                "minItems": 1,
      -                "type": "array"
      -              },
      -              "kind": {
      -                "const": "iframe",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "kind",
      -              "chain"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "name": {
      -        "type": "string"
      -      },
      -      "strategy": {
      -        "const": "role",
      -        "type": "string"
      -      },
      -      "value": {
      -        "enum": [
      -          "button",
      -          "link",
      -          "textbox",
      -          "checkbox",
      -          "radio",
      -          "combobox",
      -          "heading",
      -          "listitem",
      -          "option",
      -          "tab"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "strategy",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "frame": {
      -        "description": "Top document or a bounded outer-to-inner chain of semantic iframe element selectors",
      -        "oneOf": [
      -          {
      -            "properties": {
      -              "kind": {
      -                "const": "main",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "kind"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "chain": {
      -                "items": {
      -                  "oneOf": [
      -                    {
      -                      "properties": {
      -                        "exact": {
      -                          "default": true,
      -                          "type": "boolean"
      -                        },
      -                        "name": {
      -                          "type": "string"
      -                        },
      -                        "strategy": {
      -                          "const": "role",
      -                          "type": "string"
      -                        },
      -                        "value": {
      -                          "enum": [
      -                            "button",
      -                            "link",
      -                            "textbox",
      -                            "checkbox",
      -                            "radio",
      -                            "combobox",
      -                            "heading",
      -                            "listitem",
      -                            "option",
      -                            "tab"
      -                          ],
      -                          "type": "string"
      -                        }
      -                      },
      -                      "required": [
      -                        "strategy",
      -                        "value"
      -                      ],
      -                      "type": "object"
      -                    },
      -                    {
      -                      "properties": {
      -                        "strategy": {
      -                          "enum": [
      -                            "text",
      -                            "label",
      -                            "placeholder",
      -                            "testId",
      -                            "css"
      -                          ],
      -                          "type": "string"
      -                        },
      -                        "value": {
      -                          "minLength": 1,
      -                          "type": "string"
      -                        }
      -                      },
      -                      "required": [
      -                        "strategy",
      -                        "value"
      -                      ],
      -                      "type": "object"
      -                    }
      -                  ]
      -                },
      -                "maxItems": 5,
      -                "minItems": 1,
      -                "type": "array"
      -              },
      -              "kind": {
      -                "const": "iframe",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "kind",
      -              "chain"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "strategy": {
      -        "enum": [
      -          "text",
      -          "label",
      -          "placeholder",
      -          "testId",
      -          "css"
      -        ],
      -        "type": "string"
      -      },
      -      "value": {
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "strategy",
      -      "value"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "exact": {
      +        "default": true,
      +        "type": "boolean"
      +      },
      +      "frame": {
      +        "$ref": "#/$defs/shared0"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "strategy": {
      +        "const": "role",
      +        "type": "string"
      +      },
      +      "value": {
      +        "$ref": "#/$defs/shared1"
      +      }
      +    },
      +    "required": [
      +      "strategy",
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "frame": {
      +        "$ref": "#/$defs/shared0"
      +      },
      +      "strategy": {
      +        "$ref": "#/$defs/shared2"
      +      },
      +      "value": {
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "strategy",
      +      "value"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedOutput schema / $defs
      Added value: +{
      +  "shared0": {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "shared1": {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  }
      +}
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / truncation / properties / maxBytes / $ref
      Added value: +"#/$defs/shared1"
    • removedOutput schema / properties / truncation / properties / maxBytes / exclusiveMinimum
      Removed value: -0
    • removedOutput schema / properties / truncation / properties / maxBytes / maximum
      Removed value: -9007199254740991
    • removedOutput schema / properties / truncation / properties / maxBytes / type
      Removed value: -"integer"
    • addedOutput schema / properties / truncation / properties / maxChars / $ref
      Added value: +"#/$defs/shared1"
    • removedOutput schema / properties / truncation / properties / maxChars / exclusiveMinimum
      Removed value: -0
    • removedOutput schema / properties / truncation / properties / maxChars / maximum
      Removed value: -9007199254740991
    • removedOutput schema / properties / truncation / properties / maxChars / type
      Removed value: -"integer"
    • addedOutput schema / properties / truncation / properties / originalBytes / $ref
      Added value: +"#/$defs/shared0"
    • removedOutput schema / properties / truncation / properties / originalBytes / maximum
      Removed value: -9007199254740991
    • removedOutput schema / properties / truncation / properties / originalBytes / minimum
      Removed value: -0
    • removedOutput schema / properties / truncation / properties / originalBytes / type
      Removed value: -"integer"
    • addedOutput schema / properties / truncation / properties / originalChars / $ref
      Added value: +"#/$defs/shared0"
    • removedOutput schema / properties / truncation / properties / originalChars / maximum
      Removed value: -9007199254740991
    • removedOutput schema / properties / truncation / properties / originalChars / minimum
      Removed value: -0
    • removedOutput schema / properties / truncation / properties / originalChars / type
      Removed value: -"integer"
    • addedOutput schema / properties / truncation / properties / returnedBytes / $ref
      Added value: +"#/$defs/shared0"
    • removedOutput schema / properties / truncation / properties / returnedBytes / maximum
      Removed value: -9007199254740991
    • removedOutput schema / properties / truncation / properties / returnedBytes / minimum
      Removed value: -0
    • removedOutput schema / properties / truncation / properties / returnedBytes / type
      Removed value: -"integer"
    • addedOutput schema / properties / truncation / properties / returnedChars / $ref
      Added value: +"#/$defs/shared0"
    • removedOutput schema / properties / truncation / properties / returnedChars / maximum
      Removed value: -9007199254740991
    • removedOutput schema / properties / truncation / properties / returnedChars / minimum
      Removed value: -0
    • removedOutput schema / properties / truncation / properties / returnedChars / type
      Removed value: -"integer"
  2. Changed2 schema fields changedv0.1.5
    • changedInput schema / properties / locator / oneOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "exact": {
      -        "default": true,
      -        "type": "boolean"
      -      },
      -      "name": {
      -        "type": "string"
      -      },
      -      "strategy": {
      -        "const": "role",
      -        "type": "string"
      -      },
      -      "value": {
      -        "enum": [
      -          "button",
      -          "link",
      -          "textbox",
      -          "checkbox",
      -          "radio",
      -          "combobox",
      -          "heading",
      -          "listitem",
      -          "option",
      -          "tab"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "strategy",
      -      "value"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "strategy": {
      -        "enum": [
      -          "text",
      -          "label",
      -          "placeholder",
      -          "testId",
      -          "css"
      -        ],
      -        "type": "string"
      -      },
      -      "value": {
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "strategy",
      -      "value"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "exact": {
      +        "default": true,
      +        "type": "boolean"
      +      },
      +      "frame": {
      +        "description": "Top document or a bounded outer-to-inner chain of semantic iframe element selectors",
      +        "oneOf": [
      +          {
      +            "properties": {
      +              "kind": {
      +                "const": "main",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "properties": {
      +              "chain": {
      +                "items": {
      +                  "oneOf": [
      +                    {
      +                      "properties": {
      +                        "exact": {
      +                          "default": true,
      +                          "type": "boolean"
      +                        },
      +                        "name": {
      +                          "type": "string"
      +                        },
      +                        "strategy": {
      +                          "const": "role",
      +                          "type": "string"
      +                        },
      +                        "value": {
      +                          "enum": [
      +                            "button",
      +                            "link",
      +                            "textbox",
      +                            "checkbox",
      +                            "radio",
      +                            "combobox",
      +                            "heading",
      +                            "listitem",
      +                            "option",
      +                            "tab"
      +                          ],
      +                          "type": "string"
      +                        }
      +                      },
      +                      "required": [
      +                        "strategy",
      +                        "value"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    {
      +                      "properties": {
      +                        "strategy": {
      +                          "enum": [
      +                            "text",
      +                            "label",
      +                            "placeholder",
      +                            "testId",
      +                            "css"
      +                          ],
      +                          "type": "string"
      +                        },
      +                        "value": {
      +                          "minLength": 1,
      +                          "type": "string"
      +                        }
      +                      },
      +                      "required": [
      +                        "strategy",
      +                        "value"
      +                      ],
      +                      "type": "object"
      +                    }
      +                  ]
      +                },
      +                "maxItems": 5,
      +                "minItems": 1,
      +                "type": "array"
      +              },
      +              "kind": {
      +                "const": "iframe",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "chain"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "strategy": {
      +        "const": "role",
      +        "type": "string"
      +      },
      +      "value": {
      +        "enum": [
      +          "button",
      +          "link",
      +          "textbox",
      +          "checkbox",
      +          "radio",
      +          "combobox",
      +          "heading",
      +          "listitem",
      +          "option",
      +          "tab"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "strategy",
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "frame": {
      +        "description": "Top document or a bounded outer-to-inner chain of semantic iframe element selectors",
      +        "oneOf": [
      +          {
      +            "properties": {
      +              "kind": {
      +                "const": "main",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "properties": {
      +              "chain": {
      +                "items": {
      +                  "oneOf": [
      +                    {
      +                      "properties": {
      +                        "exact": {
      +                          "default": true,
      +                          "type": "boolean"
      +                        },
      +                        "name": {
      +                          "type": "string"
      +                        },
      +                        "strategy": {
      +                          "const": "role",
      +                          "type": "string"
      +                        },
      +                        "value": {
      +                          "enum": [
      +                            "button",
      +                            "link",
      +                            "textbox",
      +                            "checkbox",
      +                            "radio",
      +                            "combobox",
      +                            "heading",
      +                            "listitem",
      +                            "option",
      +                            "tab"
      +                          ],
      +                          "type": "string"
      +                        }
      +                      },
      +                      "required": [
      +                        "strategy",
      +                        "value"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    {
      +                      "properties": {
      +                        "strategy": {
      +                          "enum": [
      +                            "text",
      +                            "label",
      +                            "placeholder",
      +                            "testId",
      +                            "css"
      +                          ],
      +                          "type": "string"
      +                        },
      +                        "value": {
      +                          "minLength": 1,
      +                          "type": "string"
      +                        }
      +                      },
      +                      "required": [
      +                        "strategy",
      +                        "value"
      +                      ],
      +                      "type": "object"
      +                    }
      +                  ]
      +                },
      +                "maxItems": 5,
      +                "minItems": 1,
      +                "type": "array"
      +              },
      +              "kind": {
      +                "const": "iframe",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "chain"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "strategy": {
      +        "enum": [
      +          "text",
      +          "label",
      +          "placeholder",
      +          "testId",
      +          "css"
      +        ],
      +        "type": "string"
      +      },
      +      "value": {
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "strategy",
      +      "value"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "operationId": {
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "pageId": {
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "sessionId": {
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "text": {
      +      "type": "string"
      +    },
      +    "truncation": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "maxBytes": {
      +          "exclusiveMinimum": 0,
      +          "maximum": 9007199254740991,
      +          "type": "integer"
      +        },
      +        "maxChars": {
      +          "exclusiveMinimum": 0,
      +          "maximum": 9007199254740991,
      +          "type": "integer"
      +        },
      +        "originalBytes": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "originalChars": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "returnedBytes": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "returnedChars": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "truncated": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "truncated",
      +        "originalChars",
      +        "originalBytes",
      +        "returnedChars",
      +        "returnedBytes",
      +        "maxChars",
      +        "maxBytes"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "operationId",
      +    "sessionId",
      +    "pageId",
      +    "text",
      +    "truncation"
      +  ],
      +  "type": "object"
      +}
  3. First observedv0.1.2

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false, establishing the safety profile. The description adds that the tool operates on visible text and remains within a page/session, providing additional scoping context beyond the annotations. No contradictions.

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?

The description is two sentences, front-loaded with the action ('Read visible text') and packs essential details (locator types, iframe chain, page/session confinement) without waste. Efficient and well-structured.

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 the complexity of the locator (with iframe chains) and the presence of an output schema, the description covers the core purpose and scoping adequately. It does not explain return values, but that's covered by the output schema. It is sufficiently complete for a read-only tool with safety annotations, though it could mention timeout behavior or edge cases.

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 0%, so the description must carry the burden. It explains the locator concept ('semantic or CSS locator' and 'iframe chain'), adding meaning for the complex locator parameter. However, it does not explicitly address sessionId, pageId, or timeoutMs, leaving some parameters only schema-defined. The value added is partial, not comprehensive.

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 tool reads visible text from a semantic or CSS locator on a specific page. It distinguishes itself from sibling tools like browser_snapshot or browser_get_title by specifying the locator-based extraction and page confinement.

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?

The description explicitly identifies the scope: 'one explicitly addressed page' and 'the lookup remains confined to that page and session.' This gives clear context for when to use the tool, but it does not name alternatives or state when not to use it, so it falls short of a 5.

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

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/scrollDynasty/BrowserMesh'

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