Skip to main content
Glama

fileforge_page_interaction

Destructive

Read and act on one open browser page: get text, DOM snapshots, and forms; click, fill, scroll, assert state, and debug selectors. Click and fill can change the real signed-in page.

Instructions

Read and act inside one open page: get text, snapshots and forms, click, fill, scroll, assert, and debug selectors. click and fill act on the real signed-in page, so they can submit or change data. hide_elements lasts until restore_hidden_elements. Use fileforge_qa_testing for repeatable checks across pages and fileforge_scrape_action for structured extraction. Needs the extension.

Input Schema

NameRequiredDescriptionDefault
modeNoLink checking mode.extract_only
depthNoDepth for DOM snapshot
storeNoSave the result in ~/.fileforge and return a ref.
tabIdNoTab ID, or "active" for the active tab.active
valueNoValue to fill
actionYesWhat to do. Required parameters are in brackets. get_text: Get visible text from a page or selector. get_dom_snapshot: Snapshot the DOM tree. get_layered_snapshot: Layered DOM snapshot with screenshots. get_accessibility_tree: Get the page accessibility tree. get_interactive_elements: List interactive elements on the page. get_forms: Extract forms on the page. wait_for_selector (selector): Wait for a selector to appear. click (selector): Click a selector. fill (selector, value): Fill a form field. scroll: Scroll the page. reveal (selector): Scroll a selector into view. get_element_debug_info (selector): Debug info for an element. hide_elements (selectors): Hide elements matching selectors. restore_hidden_elements: Restore previously hidden elements. extract_article: Extract the article-style main content. compare_visible_vs_article: Compare visible text against extracted article. assert (assertions): Run assertions against page state (url, title, text, selectors, inputs). smoke_test: Quick health check: loaded, text, interactives, errors, images, layout. find_errors: Find visible error text patterns on the page. check_broken_images: Detect broken or unloaded images. check_links: Inspect all anchor links for missing hrefs, javascript:, external, etc. check_layout: Detect layout issues: overflow, zero-size clickables, overlapping elements, modals. debug_selector (selector): Debug a CSS selector: match count, visibility, alternatives, warnings. debug_clickability (selector): Check why an element can or cannot be clicked. capture_debug_bundle: One-call diagnostic bundle: page info, errors, layout, images, links, screenshot. wait_for_page_change: Poll until page state changes (url, title, text, elements) or timeout. compare_snapshots (beforeStateId, afterStateId): Compare two stored page state snapshots by stateId.
amountNoScroll distance in pixels.
checksNoSpecific checks to run (smoke_test or check_layout). Defaults apply if omitted.
includeNoBundle sections: pageInfo, viewport, visibleText, interactiveElements, forms, screenshot, errors, layoutIssues, brokenImages, links.
projectNoProject name that groups stored results.default
fallbackNoTry a simpler method if the first one fails.
selectorNoCSS selector.
directionNoScroll direction.down
selectorsNoCSS selectors of the target elements.
timeoutMsNoTime limit in milliseconds.
assertionsNoList of assertions. Each has: type, value?, selector?, text?, count?.
maxMatchesNoMax matches for find_errors.
changeTypesNoWhich change types to watch. Defaults to all.
maxElementsNoMaximum elements to return.
previousUrlNoURL to compare the current page against.
afterStateIdNostateId of the later page state.
maxTextCharsNoMaximum characters of text to return.
beforeStateIdNostateId of the earlier page state.
includeHiddenNoInclude hidden elements in find_errors / check_broken_images / check_links.
maxHtmlLengthNoMaximum HTML length to return.
maxTextLengthNoMaximum text length to return.
includeExternalNoInclude external links.
previousStateIdNostateId from a previous query_page / smoke_test / capture_debug_bundle.
textSampleLimitNoMaximum characters in the text sample.
includeSelectorsNoInclude CSS selectors for elements.
previousTextHashNoText hash to compare the current page against.
includeScreenshotFallbackNoUse a screenshot when text extraction fails.

Output Schema

NameRequiredDescriptionDefault
okYesFalse if the action failed or a check did not pass.
refNoStored result ID, for fileforge_result_action.
dataNoThe result. Its shape depends on the action.
metaNoTool, action and context.
errorNoFailure code and message.
warningsNoNotes about a call that still ran.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed22 schema fields changedv0.3.0
    • changedInput schema / properties / action / description
      Previous value: -"The page action to perform."New value: +"What to do. Required parameters are in brackets. get_text: Get visible text from a page or selector. get_dom_snapshot: Snapshot the DOM tree. get_layered_snapshot: Layered DOM snapshot with screenshots. get_accessibility_tree: Get the page accessibility tree. get_interactive_elements: List interactive elements on the page. get_forms: Extract forms on the page. wait_for_selector (selector): Wait for a selector to appear. click (selector): Click a selector. fill (selector, value): Fill a form field. scroll: Scroll the page. reveal (selector): Scroll a selector into view. get_element_debug_info (selector): Debug info for an element. hide_elements (selectors): Hide elements matching selectors. restore_hidden_elements: Restore previously hidden elements. extract_article: Extract the article-style main content. compare_visible_vs_article: Compare visible text against extracted article. assert (assertions): Run assertions against page state (url, title, text, selectors, inputs). smoke_test: Quick health check: loaded, text, interactives, errors, images, layout. find_errors: Find visible error text patterns on the page. check_broken_images: Detect broken or unloaded images. check_links: Inspect all anchor links for missing hrefs, javascript:, external, etc. check_layout: Detect layout issues: overflow, zero-size clickables, overlapping elements, modals. debug_selector (selector): Debug a CSS selector: match count, visibility, alternatives, warnings. debug_clickability (selector): Check why an element can or cannot be clicked. capture_debug_bundle: One-call diagnostic bundle: page info, errors, layout, images, links, screenshot. wait_for_page_change: Poll until page state changes (url, title, text, elements) or timeout. compare_snapshots (beforeStateId, afterStateId): Compare two stored page state snapshots by stateId."
    • addedInput schema / properties / afterStateId / description
      Added value: +"stateId of the later page state."
    • addedInput schema / properties / amount / description
      Added value: +"Scroll distance in pixels."
    • addedInput schema / properties / beforeStateId / description
      Added value: +"stateId of the earlier page state."
    • addedInput schema / properties / direction / description
      Added value: +"Scroll direction."
    • addedInput schema / properties / fallback / description
      Added value: +"Try a simpler method if the first one fails."
    • addedInput schema / properties / includeExternal / description
      Added value: +"Include external links."
    • addedInput schema / properties / includeScreenshotFallback / description
      Added value: +"Use a screenshot when text extraction fails."
    • addedInput schema / properties / includeSelectors / description
      Added value: +"Include CSS selectors for elements."
    • addedInput schema / properties / maxElements / description
      Added value: +"Maximum elements to return."
    • addedInput schema / properties / maxHtmlLength / description
      Added value: +"Maximum HTML length to return."
    • addedInput schema / properties / maxTextChars / description
      Added value: +"Maximum characters of text to return."
    • addedInput schema / properties / maxTextLength / description
      Added value: +"Maximum text length to return."
    • addedInput schema / properties / previousTextHash / description
      Added value: +"Text hash to compare the current page against."
    • addedInput schema / properties / previousUrl / description
      Added value: +"URL to compare the current page against."
    • addedInput schema / properties / project / description
      Added value: +"Project name that groups stored results."
    • addedInput schema / properties / selectors / description
      Added value: +"CSS selectors of the target elements."
    • addedInput schema / properties / store / description
      Added value: +"Save the result in ~/.fileforge and return a ref."
    • addedInput schema / properties / tabId / description
      Added value: +"Tab ID, or \"active\" for the active tab."
    • addedInput schema / properties / textSampleLimit / description
      Added value: +"Maximum characters in the text sample."
    • addedInput schema / properties / timeoutMs / description
      Added value: +"Time limit in milliseconds."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "query_* actions return their modules as extra top-level fields.",
      +  "properties": {
      +    "data": {
      +      "description": "The result. Its shape depends on the action."
      +    },
      +    "error": {
      +      "description": "Failure code and message."
      +    },
      +    "meta": {
      +      "description": "Tool, action and context."
      +    },
      +    "ok": {
      +      "description": "False if the action failed or a check did not pass.",
      +      "type": "boolean"
      +    },
      +    "ref": {
      +      "description": "Stored result ID, for fileforge_result_action."
      +    },
      +    "warnings": {
      +      "description": "Notes about a call that still ran."
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.2.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and openWorldHint=true, so the safety profile is known. The description still adds real value beyond them: it warns that click and fill act on the real signed-in page and can submit or change data, and that hide_elements persists until restore_hidden_elements. The extension prerequisite is also disclosed. It does not cover rate limits or failure modes, keeping it below a 5.

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?

Four tight sentences, front-loaded with the core purpose, then the mutation warning, then the state-persistence caveat, then routing and prerequisites. No filler. The action enumeration in the first sentence is slightly redundant with the schema enum but serves as a scannable summary.

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?

With 32 parameters, an output schema, and full annotations, the description does what structured fields cannot: it flags destructive side effects, persistent hidden-element state, the extension dependency, and sibling alternatives. Given the output schema exists, return values need not be explained. The main gap is that the distinction from fileforge_browser_action is left implicit.

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 action enum already documents required parameters per action, so the schema carries the parameter burden. The description adds no syntax, format, or defaulting detail beyond what the schema provides. Baseline 3 is appropriate.

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+resource ('Read and act inside one open page') and enumerates the capability families (text, snapshots, forms, click, fill, scroll, assert, selector debugging). It also names the two sibling tools it is not, so an agent can place it in the toolset. The only shortfall is that a 27-action grab-bag is hard to characterize in one line, so the boundary with fileforge_browser_action is not fully drawn.

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?

It gives explicit routing: use fileforge_qa_testing for repeatable checks across pages and fileforge_scrape_action for structured extraction, which tells the agent when to prefer alternatives. It also states the prerequisite ('Needs the extension'). It stops short of per-action when-to-use guidance, which matters for a tool with 27 actions.

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