Skip to main content
Glama

Filter Talonic Documents

talonic_filter
Read-only

Filter documents by extracted field values using operators like eq, gt, between. Get a paginated, sortable list matching your structured criteria.

Instructions

STATUS: stable. Field-name resolution is server-side.

Filter the user's Talonic documents by extracted field values using composable conditions. Conditions accept either a canonical field name (e.g. 'vendor.name', 'policy.0_coverage_type') or a field UUID. The Talonic API resolves names to ids server-side.

USE WHEN:

  • The user wants documents matching specific structured criteria, like 'invoices over 1000 EUR' or 'contracts expiring before 2026-12-31' or 'COIs from Acme'.

  • The query is value-based on extracted fields, not a free-text concept search.

  • You need to retrieve a sortable, paginated list filtered by field conditions.

DO NOT USE WHEN:

  • The user wants conceptual / free-text search across content (use talonic_search).

  • The user is looking for a single document by id (use talonic_get_document).

  • The user wants extracted data from a new document (use talonic_extract).

OPERATORS:

  • eq, neq: equality / inequality.

  • gt, gte, lt, lte: numeric or date comparisons.

  • between: requires both value and value_to.

  • contains: substring match on string fields.

  • is_empty: presence check, no value needed. Returns documents where the field is null or missing.

  • is_not_empty: presence check, no value needed. Returns documents where the field has a materialized value. Results reflect data within seconds of extraction completing.

SCHEMA TYPING:

  • Numeric operators (gt, gte, lt, lte, between) only resolve correctly when the schema field is typed as number. A field typed as string that holds numeric content (e.g. '€1,500.00') will silently return zero matches even after extraction. Pick the right type at schema design time.

  • If the response contains a warnings array, surface its message (and suggestion, if present) to the user verbatim — these explain why a query returned zero or unexpected results and typically suggest a schema-design change (e.g. switching a field's data_type from string to number) that will make subsequent filter calls work correctly. Do not silently retry without flagging the warning.

TIPS:

  • To discover available field names, call talonic_search first with a related query. Only use fields[] entries where filterable is true — their canonicalName is what to pass as field here. Fields with filterable: false have no extracted data yet.

  • fieldMatches[].resolvedFieldId is only valid when filterable is true. Entries with filterable: false have resolvedFieldId: null and cannot be used for filtering.

  • Both field (name) and field_id (UUID) reach the API as fieldId. Either is fine.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conditionsYesOne or more filter conditions, AND-ed together.
searchNoOptional free-text search applied alongside the filters.
sortNoOptional sort by a field.
pageNoPage number for pagination.
limitNoResults per page. Default 50 server-side.
source_connection_idNoOptionally scope to a specific source connection.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesDocuments matching the filter conditions, with their extracted field values.
totalNoTotal documents matching across all pages.
pageNoCurrent page number.
paginationNoCursor-based pagination metadata.
warningsNoAPI warnings surfaced by the Talonic filter endpoint. Most commonly raised when a numeric operator is applied to a string-typed field, in which case the warning explains the lexicographic-comparison trap and suggests a schema-design change. Agents should surface these to the user rather than silently retrying.
Behavior5/5

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

Beyond annotations (readOnlyHint, openWorldHint), the description details field-name resolution, the need to check filterable flags, schema typing nuances (numeric vs string), the implications of the warnings array, and that results reflect data within seconds of extraction. No contradictions with annotations.

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?

The description is well-structured with clear sections (USE/DO NOT USE, OPERATORS, SCHEMA TYPING, TIPS) and front-loaded with the most critical info. While every sentence adds value, minor redundancy exists (e.g., field resolution mentioned twice), keeping it from a perfect 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, nested objects, output schema present), the description comprehensively addresses usage context, behavioral constraints, error handling (warnings), and edge cases (schema typing, filterable fields). The output schema covers return structure, so description need not repeat it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 100% schema coverage, the description adds substantial value: it explains operator behaviors (especially is_empty/is_not_empty, between), provides schema typing warnings, instructs how to surface warnings, and gives tips for discovering filterable fields. This goes far beyond what the schema provides.

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 filters Talonic documents by extracted field values using composable conditions, specifying that field names can be canonical or UUIDs. It distinguishes itself from siblings by explicitly stating when not to use it (free-text search, single doc retrieval, extraction).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes dedicated 'USE WHEN' and 'DO NOT USE WHEN' sections with concrete examples (e.g., invoices over 1000 EUR, contracts expiring before date) and names alternative tools like talonic_search, talonic_get_document, and talonic_extract, providing excellent decision support.

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/talonicdev/talonic-mcp'

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