Extract structured FIELDS from a document (PDF or image) with a vision model. USE THIS WHEN you need specific values OUT of a document — a payslip's gross/net, an invoice's total/ABN, a form's checkboxes, a table's cells — rather than a yes/no about the document. (For "is this genuine?" use verif...
AI agents call extract_fields to retrieve information from OpenWarrant without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | object | — | |
fields | object | — | |
country | object | — | |
filename | string | — | |
template | object | — | |
bytes_b64 | object | — | |
max_pages | object | — |
Parameters from the server's own tool schema.
This tool retrieves and extracts data from documents without modifying, deleting, or executing arbitrary code. The use cases (payslips, invoices, forms) confirm read-only extraction. Severity is medium rather than low because extracted fields from sensitive documents (payslips, invoices, identity documents) could expose PII or financial information if an agent misuses the tool or sends it to unintended recipients.
From the tool's definition Extract structured FIELDS from a document (PDF or image) with a vision model. USE THIS WHEN you need specific values OUT of a document — a payslip's gross/net, an invoice's total/ABN, a form's checkboxes, a table's cells.
Risk signalsAccepts file system path (filename) · Accepts URL/endpoint input (url) · Accepts raw HTML/template content (template) · Bulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
Extract structured FIELDS from a document (PDF or image) with a vision model. USE THIS WHEN you need specific values OUT of a document — a payslip's gross/net, an invoice's total/ABN, a form's checkboxes, a table's cells — rather than a yes/no about the document. (For "is this genuine?" use verify_document; for "what kind of document is this?" classify_document.) Say WHAT to pull, four ways: - fields: an ad-hoc list — names like ["gross_pay","abn"], or objects {"name":..., "type":"text|amount|date|boolean", "description":...}. THE general case: ask for exactly the fields your task needs. Use type "boolean" for a checkbox/tickbox. - template: a named preset — "payslip", "tax_invoice", "bank_statement", "receipt". - NEITHER: AUTO — the document is classified and that type's fields are used. - auto on an unrecognised type: schema-free — every labelled field is returned. Provide the document ONE way: url (a public http(s) link — fetched server-side, the cheapest call) OR bytes_b64 (inline base64, plus filename for PDF-vs-image routing). country is an optional hint; max_pages caps how many pages are read (default a few; hard ceiling 10). Returns {mode, document_type, fields{name:{value,confidence,page}}, not_found, pages_read, page_limit}. EXTRACTION, not verification — values are what the document SHOWS, not proof it is genuine. A field that isn't clearly present comes back in not_found (it abstains rather than guessing). The document is never stored. It is categorised as a Read tool in the OpenWarrant MCP Server, which means it retrieves data without modifying state.
extract_fields accepts 7 parameters: url, fields, country, filename, template, bytes_b64, max_pages. The full parameter table on this page comes from the server's own tool schema.
Register the OpenWarrant MCP server in PolicyLayer and add a rule for extract_fields: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches OpenWarrant. Nothing to install.
extract_fields is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the extract_fields rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for extract_fields. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
extract_fields is provided by the OpenWarrant MCP server (https://www.stipple.sh/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →