Skip to main content
Glama
Figranium MCP Server

Figranium MCP Server

Official

folate_resolve

Read-onlyIdempotent

Resolve natural-language element descriptions against page HTML into ranked CSS/XPath selectors, eliminating brittle selector guessing or headful browser sessions.

Instructions

Resolve a natural-language element description against page HTML into ranked CSS/XPath selectors using Figranium's Folate endpoint (POST /api/folate/resolve). Use this instead of guessing brittle selectors or launching a headful browser session.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>",
      "html": "<html>"
    },
    "name": "folate_resolve"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesRaw HTML of the target page to rank interactive DOM elements against.
topKNoOptional number of top candidate matches to return (integer 1-20, default 3).
queryYesNatural-language description of the target DOM element (1-1000 chars). Example: 'click Search Flights button'
maxCandidatesNoOptional maximum number of DOM candidates to evaluate (integer 1-200, default 48).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety and side-effect profile is covered structurally. The description adds that the operation is a POST to a remote Folate endpoint and that results come back ranked, but says nothing about latency, failure behavior when no candidate matches, or how large an HTML payload can be handled. With annotations carrying the main behavioral burden, this is adequate but thin.

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, zero filler: the first states the action and its output form, the second states the usage rationale. Everything is front-loaded and every clause earns its place.

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?

For a four-parameter read-only resolution tool with no output schema, the description supplies the output shape (ranked CSS/XPath selectors), which is the key missing structured information. Remaining gaps are minor edge-case details such as empty-result behavior and input size constraints.

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 every parameter (html, query, topK, maxCandidates) already has a description with type, range, and default, so the schema does the heavy lifting. The description adds no extra meaning about these parameters, such as how topK interacts with maxCandidates or how candidate evaluation cost scales. Baseline 3 applies when the schema is fully documented.

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 names a specific verb (resolve), a concrete input (natural-language element description + page HTML), and a concrete output (ranked CSS/XPath selectors), plus the backing endpoint POST /api/folate/resolve. This is unmistakably distinct from sibling tools such as folate_status or task_execute, which deal with status or task execution rather than selector resolution.

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?

"Use this instead of guessing brittle selectors or launching a headful browser session" gives a clear positive trigger and contrasts with two non-tool workarounds. It does not name a specific sibling alternative or state when-not-to-use conditions, so it falls short of a full 5.

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