Skip to main content
Glama

Search documents in DMS

po_documents_search
Read-onlyIdempotent

READ-ONLY. Returns data, changes nothing. Search documents by keyword, filename and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number, 1-based; values below 1 are normalized to page 1. A page above total_pages returns no documents plus a pagination warning.
debugNoInclude ranking debug info. Default false.
limitNoMax results (1-500)
queryYesSearch term, at least 2 characters. Use * with workspace_id to list.
date_toNoFilter: to upload date (YYYY-MM-DD). Filters by created_at (upload date), NOT document issue date.
sort_byNoResult order. relevance (default for keyword search): best match first (0–100 score). modified_desc / modified_asc: last content/metadata change (date_modified). uploaded_desc / uploaded_asc: upload date (date_uploaded). name_asc / name_desc: display/file name. Browse mode (* or empty query) defaults to uploaded_desc unless sort_by is set.
date_fromNoFilter: from upload date (YYYY-MM-DD). Filters by created_at (upload date), NOT document issue date.
search_modeNoSearch strategy. semantic = embeddings only; similarity_threshold filters the result set (no OCR/fulltext fallback). hybrid/intelligent = fused lexical + semantic; threshold applies only to the semantic channel. fulltext = lexical (filename/OCR/entity), threshold is ignored.intelligent
search_scopeNoSearch scope. "current" searches only workspace_id; "all" searches all accessible workspaces while using workspace_id as the security anchor.current
workspace_idYesWorkspace ID (>0). Required by the API. Use po_workspaces_list to choose a valid workspace; never use 0.
document_typeNoFilter by type key from po_documents_document_types_list (e.g. invoice, contract) or a type label in any language. Labels such as Rechnung, Facture or Fattura are mapped to the type key automatically.
filename_onlyNoFast lane: only search in file_name (skips OCR, entity, meta_fields subqueries). Use when the user clearly asks for a file by name (e.g. "find Q3-report.pdf", "show me the contract called Acme.docx"). Drastically faster on large tenants.
issued_date_toNoFilter: to document issue date (YYYY-MM-DD). Filters by the date printed ON the document (e.g. invoice date).
include_summaryNoInclude AI summary in results (default: true). Set to false for faster, smaller responses.
issued_date_fromNoFilter: from document issue date (YYYY-MM-DD). Filters by the date printed ON the document (e.g. invoice date).
search_budget_msNoOptional per-search soft budget in milliseconds (1-30000, default 8000). When exceeded, expensive sub-sources (OCR/Entity/Semantic) are skipped and _search_quality.partial=true is reported. Use only when explicitly trading latency vs completeness, or in eval scenarios to force the partial path.
signature_statusNoFilter by signature status, not document fulltext. Codes: not_signed, signed, pending, declined, expired.
document_type_hintNoOptional ranking hint with a type key (e.g. invoice). Set by the agent query analyzer; used as ranking/filter signal, not as hard-only filter.
include_historicalNoVersioning: include older document versions in the results. Default false = only the current version of each document line (older versions are hidden). Each result carries version, version_count, is_latest_version and latest_pofid.
similarity_thresholdNoOptional semantic similarity threshold (0.0-1.0) for semantic/hybrid search. Use with debug=true for reproducible ranking diagnostics.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hintNo
pageNo
textNo
limitNo
detailsNo
foldersNo
messageNo
_warningsNo
documentsNoDocument references (pofid, documents_id, display_name, original_file_name, ...)
retryableNo
error_codeNo
http_statusNo
score_scaleNo
search_modeNo
total_pagesNo
total_matchingNoDocuments matching the query/filters
results_on_pageNo
sort_by_appliedNo
_billing_summaryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / document_type / description
      Previous value: -"Filter: document type — type key (see po_documents_document_types_list, e.g. invoice, contract, letter, quote, receipt) or a label in any language (Rechnung, Facture, Fattura, ...). Labels are mapped to the type key automatically."New value: +"Filter by type key from po_documents_document_types_list (e.g. invoice, contract) or a type label in any language. Labels such as Rechnung, Facture or Fattura are mapped to the type key automatically."
    • changedInput schema / properties / document_type_hint / description
      Previous value: -"Optional canonical document type hint from the agent query analyzer, e.g. invoice, contract, letter, quote, receipt. Used as ranking/filter signal, not as hard-only filter."New value: +"Optional ranking hint with a type key (e.g. invoice). Set by the agent query analyzer; used as ranking/filter signal, not as hard-only filter."
    • changedInput schema / properties / page / description
      Previous value: -"Page number, 1-based."New value: +"Page number, 1-based; values below 1 are normalized to page 1. A page above total_pages returns no documents plus a pagination warning."
  2. Changed4 schema fields changed
    • changedInput schema / properties / debug / description
      Previous value: -"Include debug info (ranking scores, search timing, embedding distances) in results. Default: false."New value: +"Include ranking debug info. Default false."
    • changedInput schema / properties / page / description
      Previous value: -"Page number, 1-based; values below 1 are normalized to page 1, a page above total_pages returns no documents plus a pagination warning."New value: +"Page number, 1-based."
    • changedInput schema / properties / query / description
      Previous value: -"Search term (REQUIRED — min 2 characters for keyword search; use * or ** for browse/list mode with workspace_id)"New value: +"Search term, at least 2 characters. Use * with workspace_id to list."
    • changedInput schema / properties / signature_status / description
      Previous value: -"Filter by PaperOffice Sign status from signature_requests (NOT document fulltext). Use with query=\"*\" for workspace browse. Codes: not_signed, has_signature_process (any signature request), signed, pending, declined, expired. Comma-separated string or array for OR filter."New value: +"Filter by signature status, not document fulltext. Codes: not_signed, signed, pending, declined, expired."
  3. Changed1 schema field changed
    • changedInput schema / properties / document_type / description
      Previous value: -"Filter: document type — accepts English (invoice, contract, letter, quote, receipt) or German (Rechnung, Vertrag, Brief, Angebot, Quittung). Both languages are matched automatically."New value: +"Filter: document type — type key (see po_documents_document_types_list, e.g. invoice, contract, letter, quote, receipt) or a label in any language (Rechnung, Facture, Fattura, ...). Labels are mapped to the type key automatically."
  4. First observed

TDQS

C2.9/5.0
Behavior2/5

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

The annotations already declare readOnlyHint=true, destructiveHint=false and idempotentHint=true, so "READ-ONLY. Returns data, changes nothing." merely restates structured data and earns no extra credit. The description adds no behavioral context beyond that, such as result caps, latency trade-offs, or the partial-result semantics exposed by the schema.

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?

Three short sentences, front-loaded with the safety profile and followed by the capability statement; nothing is padded. However, the brevity is arguably achieved by omitting content the agent needs, which limits the credit.

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

Completeness2/5

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

An output schema exists, so return values needn't be re-explained, but for a 20-parameter search tool the description supplies none of the routing context that matters most: which sibling to pick, how search modes differ operationally, or when pagination/budget settings should be touched. It is far too thin for the tool's complexity.

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 all 20 parameters (including enums, defaults and normalization rules) are fully documented in the schema itself. The description contributes no parameter meaning of its own, so the baseline 3 for high coverage applies.

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?

States a specific verb and resource ("Search documents") plus the matching surfaces (keyword, filename, metadata), so the agent knows it's a retrieval tool rather than a fetch-one tool. It does not differentiate from siblings such as po_documents_get, po_mcp_tools_search or po_documents_text_get, and it undersells the tool's actual reach (semantic/hybrid modes, date and signature filters).

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

Usage Guidelines2/5

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

There is no when-to-use guidance: nothing distinguishes this from po_documents_get (single document fetch), po_documents_text_get, or po_mcp_tools_search. No prerequisites, no exclusions, and no mention of when to prefer filename_only or a specific search_mode, despite 20 parameters implying several distinct usage patterns.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources