Skip to main content
Glama

search_natural

Search Laserfiche using natural language: get guidance to build a valid query, then execute with automatic repair of common syntax errors.

Instructions

Two-mode search: guidance first, then execution with automatic repair.

Most Laserfiche servers reject malformed query syntax with a generic HTTP 400. This tool gives the host LLM a structured way to author a working query without trial-and-error against the user.

Mode A — lf_query omitted Returns mode="guidance" with: * grammar — the Laserfiche search syntax reference this server understands, with examples. * discovered_templates — template names and field names sampled from folder_path (or the repository root). Use these to author template-field queries like {[Personnel]:[Last Name]="Smith"}. * candidate_queries — up to 3 starter queries built from the question's keywords. Pick one or refine it, then call again with lf_query. * follow_up — the exact follow-up call shape.

Mode B — lf_query provided Executes the query and returns mode="results" (or mode="error" with structured detail). On HTTP 400, up to two automatic repairs are attempted:

  1. Escape unescaped ``"`` characters inside ``="..."`` value spans.
  2. Wrap ``Name="value"`` values in ``*`` wildcards (only when
     ``fuzzy=True`` and the value has no wildcard).

Each attempt is recorded in ``attempts`` on the error response.

Pagination max_results is clamped to LF_MAX_PAGE_SIZE (default 100). Some self-hosted SimpleSearches implementations 400 on larger $top values, so the cap is lower than the list-folder ceiling. When next_link is null but the result count hit the effective cap, pagination_unknown=true is surfaced — there may be more results, the server just didn't say.

What this tool does NOT do It does not silently fall back to folder traversal. If both repairs still 400, you get a structured error so the user knows search failed and the host LLM can author a fresh query.

On failure Mode B returns {mode: "error", attempts: [...]} with the full repair history visible — each attempt records the query, the repair tag applied, the HTTP status, and the server's error body, enough context for the LLM to write a different query. Other failures (auth, rate limit, network) come back via the generic error contract; see docs/error-contract.md.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionYesThe user's natural-language search question. Used by Mode A to extract keywords for candidate queries and surfaced in Mode B responses for correlation.
lf_queryNoLaserfiche query to execute (Mode B). Omit to get guidance (Mode A): grammar reference, sampled templates, candidate queries to refine.
folder_pathNoBackslash-delimited folder path. In Mode A, narrows the template sample to this subtree; in Mode B, the LLM should embed {LF:LookIn="<path>"} in lf_query itself if scoping is wanted.
max_resultsNoPage size. Clamped to LF_MAX_PAGE_SIZE (default 100) — some self-hosted SimpleSearches implementations 400 on larger $top.
fuzzyNoWhen True (default), Mode B attempts a wildcard-wrap repair if the server 400s on a Name=value clause with no wildcards. Set False for exact-match queries that should NOT be relaxed.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description fully discloses all behavioral traits: two-mode operation, automatic repair attempts (two specific strategies), pagination clamping and unknown pagination flag, error handling with structured error response, and reference to generic error contract for auth/rate limit/network failures.

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 headings (Mode A, Mode B, Pagination, etc.), but it is somewhat verbose. It could be slightly more concise while retaining all necessary details, but the structure aids readability.

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?

Covers all aspects of the tool's behavior: modes, repairs, pagination, error handling, and limitations. The output schema likely details return structures, but the description already provides complete contextual guidance for an agent to use the tool correctly.

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?

Though schema coverage is 100%, the description adds significant value beyond field descriptions: e.g., lf_query's role in mode selection, folder_path's scoping difference between modes, fuzzy's repair condition, and max_results clamping rationale. This enriches the agent's understanding of parameter behavior.

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 defines a two-mode search tool (guidance then execution), contrasting with sibling search tools by emphasizing natural language querying and automatic repair. It specifies the verb ('search') and resource ('Laserfiche entries') and distinguishes from alternatives like 'search_entries'.

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?

Explicitly explains when to use each mode (Mode A for guidance, Mode B for execution), what to expect, and what the tool does NOT do (no silent fallback). Provides guidance on embedding scope in lf_query and on setting fuzzy=False for exact matches.

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/SamuelSHernandez/laserfiche-mcp'

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