Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LF_PASSWORDYesService account password.
LF_USERNAMEYesService account username.
LF_AUTH_MODEYesAuthentication mode, e.g., 'password'.
LF_READ_ONLYNoSet to 'false' to enable write tools.true
LF_API_VERSIONNoAPI version (v1 or v2).v1
LF_REPO_API_URLYesThe URL of the Laserfiche Repository API server.
LF_REPOSITORY_IDYesThe repository ID.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_repositoriesA

List the repositories this account can reach on the server.

Useful for confirming which repository the server is pointed at and for discovering alternate repositories the same account can access.

Endpoint variability: some self-hosted Laserfiche builds disable the /Repositories endpoint entirely. When the call fails, this tool does NOT raise — it returns the configured repo as a fallback so downstream tools can still run. Branch on mode == "fallback" if you need to distinguish a partial answer from a full enumeration.

Returns: On a healthy build, the server's raw OData listing with value: [{repoId, displayName, ...}, ...]. On endpoint failure: {"mode": "fallback", "warning": <str>, "server_error": <classified error>, "value": [{"repoId": "<LF_REPOSITORY_ID>", "displayName": null, "is_configured": true}]}.

On failure: this tool never raises and never returns mode: "error" — see the fallback shape above.

laserfiche_repository_listA

List the repositories this account can reach on the server.

Useful for confirming which repository the server is pointed at and for discovering alternate repositories the same account can access.

Endpoint variability: some self-hosted Laserfiche builds disable the /Repositories endpoint entirely. When the call fails, this tool does NOT raise — it returns the configured repo as a fallback so downstream tools can still run. Branch on mode == "fallback" if you need to distinguish a partial answer from a full enumeration.

Returns: On a healthy build, the server's raw OData listing with value: [{repoId, displayName, ...}, ...]. On endpoint failure: {"mode": "fallback", "warning": <str>, "server_error": <classified error>, "value": [{"repoId": "<LF_REPOSITORY_ID>", "displayName": null, "is_configured": true}]}.

On failure: this tool never raises and never returns mode: "error" — see the fallback shape above.

list_field_definitionsA

List every field definition in the repository.

Use before authoring a field-based search query or preparing a field update — the response tells you which fields exist, their types (String, ShortInteger, List, Date, ...), whether they accept multi-value, whether they're required at the repository level, and (for List fields) the allowed values.

Independent fields and template-scoped fields are both returned. Combine with list_template_definitions to see which fields belong to which template.

Args: max_results: Page size (default 25, capped by LF_MAX_RESULTS_CEILING). skip: 0-indexed offset for pagination through large repositories. summary_only: If True, return only {count, names} instead of the full OData listing.

Returns: Server's raw OData listing with value (list of field definitions). Each item includes id, name, fieldType, isRequired, isMultiValue, listValues, defaultValue, length, constraint.

On failure: returns {"mode": "error", "error": <slug>, ...}.

laserfiche_field_definition_listA

List every field definition in the repository.

Use before authoring a field-based search query or preparing a field update — the response tells you which fields exist, their types (String, ShortInteger, List, Date, ...), whether they accept multi-value, whether they're required at the repository level, and (for List fields) the allowed values.

Independent fields and template-scoped fields are both returned. Combine with list_template_definitions to see which fields belong to which template.

Args: max_results: Page size (default 25, capped by LF_MAX_RESULTS_CEILING). skip: 0-indexed offset for pagination through large repositories. summary_only: If True, return only {count, names} instead of the full OData listing.

Returns: Server's raw OData listing with value (list of field definitions). Each item includes id, name, fieldType, isRequired, isMultiValue, listValues, defaultValue, length, constraint.

On failure: returns {"mode": "error", "error": <slug>, ...}.

list_tag_definitionsA

List every tag definition in the repository.

Use before calling set_tags / merge_tags to confirm a tag exists — the server rejects tags that aren't defined here. Tags are a flat namespace in Laserfiche, distinct from template fields.

Args: max_results: Page size (default 25, capped by LF_MAX_RESULTS_CEILING). skip: 0-indexed offset for pagination. summary_only: If True, return only {count, names}.

Returns: Server's raw OData listing with value (list of tag definitions). Each item has id, name, and isSecurityTag. Many repositories ship with no tags defined; an empty value is normal.

On failure: returns {"mode": "error", "error": <slug>, ...}.

laserfiche_tag_definition_listA

List every tag definition in the repository.

Use before calling set_tags / merge_tags to confirm a tag exists — the server rejects tags that aren't defined here. Tags are a flat namespace in Laserfiche, distinct from template fields.

Args: max_results: Page size (default 25, capped by LF_MAX_RESULTS_CEILING). skip: 0-indexed offset for pagination. summary_only: If True, return only {count, names}.

Returns: Server's raw OData listing with value (list of tag definitions). Each item has id, name, and isSecurityTag. Many repositories ship with no tags defined; an empty value is normal.

On failure: returns {"mode": "error", "error": <slug>, ...}.

list_template_definitionsA

List template definitions in the repository.

Use to discover which templates exist before calling assign_template. Pass template_name to fetch a single template by name (the same listing, filtered server-side).

Args: template_name: If set, return only the template with this exact name. Case-sensitive on most builds. max_results: Page size (default 25, capped by LF_MAX_RESULTS_CEILING). skip: 0-indexed offset for pagination. summary_only: If True, return only {count, names}.

Returns: Server's raw OData listing with value. Each item has id, name, displayName, description, fieldCount, and color. This response does NOT enumerate the fields ON the template — use list_field_definitions to inspect those (they're the ones with isRequired=true when scoped to the template).

On failure: returns {"mode": "error", "error": <slug>, ...}.

laserfiche_template_definition_listA

List template definitions in the repository.

Use to discover which templates exist before calling assign_template. Pass template_name to fetch a single template by name (the same listing, filtered server-side).

Args: template_name: If set, return only the template with this exact name. Case-sensitive on most builds. max_results: Page size (default 25, capped by LF_MAX_RESULTS_CEILING). skip: 0-indexed offset for pagination. summary_only: If True, return only {count, names}.

Returns: Server's raw OData listing with value. Each item has id, name, displayName, description, fieldCount, and color. This response does NOT enumerate the fields ON the template — use list_field_definitions to inspect those (they're the ones with isRequired=true when scoped to the template).

On failure: returns {"mode": "error", "error": <slug>, ...}.

get_template_fieldsA

Return the fields belonging to a single template, with full field metadata.

Closes the most common pre-assign workflow gap: instead of fetching list_template_definitions then list_field_definitions and cross-referencing client-side, this returns the template's field list directly with each field's type, constraints, and required flag inlined. Use this BEFORE assign_template to construct the fields argument.

Args: template_name: Exact template name (case-sensitive on most builds). Use list_template_definitions to discover available names. required_only: When True, return only fields where is_required is true. Useful for "what's the minimum I have to supply?" workflows.

Returns: {"template_name": <str>, "template_id": <int>, "field_count": <int>, "fields": [...]} where each field has name, field_type, is_required, is_multi_value, list_values, default_value, length, constraint.

On failure: returns {"mode": "error", "error": <slug>, ...}. Slugs: invalid_template_name when the template name doesn't exist in the repository (with the list of valid names in the response); server_error for upstream issues.

laserfiche_template_field_listA

Return the fields belonging to a single template, with full field metadata.

Closes the most common pre-assign workflow gap: instead of fetching list_template_definitions then list_field_definitions and cross-referencing client-side, this returns the template's field list directly with each field's type, constraints, and required flag inlined. Use this BEFORE assign_template to construct the fields argument.

Args: template_name: Exact template name (case-sensitive on most builds). Use list_template_definitions to discover available names. required_only: When True, return only fields where is_required is true. Useful for "what's the minimum I have to supply?" workflows.

Returns: {"template_name": <str>, "template_id": <int>, "field_count": <int>, "fields": [...]} where each field has name, field_type, is_required, is_multi_value, list_values, default_value, length, constraint.

On failure: returns {"mode": "error", "error": <slug>, ...}. Slugs: invalid_template_name when the template name doesn't exist in the repository (with the list of valid names in the response); server_error for upstream issues.

list_link_definitionsA

List the entry-link type definitions available on this repository.

Use before calling set_links — you need a linkTypeId from this listing to construct a valid link. Each link type is directed: it has a sourceLabel (how the relationship reads from the source entry) and a targetLabel (how it reads from the target).

Args: max_results: Page size (default 25). skip: 0-indexed offset for pagination. summary_only: If True, return only {count, names}.

Returns: Server's raw OData listing with value. Each item has linkTypeId, sourceLabel, targetLabel, and linkTypeDescription. Common defaults include "Supersedes" / "Superseded by" and "Attachment" / "Message".

On failure: returns {"mode": "error", "error": <slug>, ...}.

laserfiche_link_definition_listA

List the entry-link type definitions available on this repository.

Use before calling set_links — you need a linkTypeId from this listing to construct a valid link. Each link type is directed: it has a sourceLabel (how the relationship reads from the source entry) and a targetLabel (how it reads from the target).

Args: max_results: Page size (default 25). skip: 0-indexed offset for pagination. summary_only: If True, return only {count, names}.

Returns: Server's raw OData listing with value. Each item has linkTypeId, sourceLabel, targetLabel, and linkTypeDescription. Common defaults include "Supersedes" / "Superseded by" and "Attachment" / "Message".

On failure: returns {"mode": "error", "error": <slug>, ...}.

get_audit_reasonsA

Return the audit-reason codes the authenticated user is allowed to supply.

Use before delete_entry or get_document_edoc (with export auditing) when LF_REQUIRE_AUDIT_REASON=true or when the user is asking for an audited delete. The response is grouped by operation type — pick an ID from the correct group.

Returns: Dict shaped roughly as {"deleteEntry": [{id, name, ...}], "exportDocument": [...], ...}. Each item has id, name, and description. The id is what you pass to delete_entry as audit_reason_id.

On failure: returns {"mode": "error", "error": <slug>, ...}. Common slugs: auth_failed if the account isn't permitted to audit.

laserfiche_audit_reason_listA

Return the audit-reason codes the authenticated user is allowed to supply.

Use before delete_entry or get_document_edoc (with export auditing) when LF_REQUIRE_AUDIT_REASON=true or when the user is asking for an audited delete. The response is grouped by operation type — pick an ID from the correct group.

Returns: Dict shaped roughly as {"deleteEntry": [{id, name, ...}], "exportDocument": [...], ...}. Each item has id, name, and description. The id is what you pass to delete_entry as audit_reason_id.

On failure: returns {"mode": "error", "error": <slug>, ...}. Common slugs: auth_failed if the account isn't permitted to audit.

get_document_textA

Download a document's server-extracted text (v2-only).

Use for "summarize this document", "what does this say", or any other task that needs the readable contents of a document rather than the raw binary. The text comes from Laserfiche's own extraction pipeline (OCR for image documents, upstream extraction for office files), so you get clean text without having to parse a PDF yourself.

v1 servers do not expose this endpoint. If your deployment is on v1 (the default), this tool returns a structured error at the client layer. Use get_document_edoc(entry_id, mode="text") instead — it fetches the raw edoc and extracts text client-side (pypdf for PDFs, direct decode for text/* MIME types).

Args: entry_id: Integer entry ID of an electronic document (not a folder). max_chars: Truncate the returned text after this many characters (default 50,000). The response's truncated field signals whether truncation occurred.

Returns: {"entry_id": <int>, "text": <str>, "char_count": <int>, "truncated": <bool>} on success.

On failure: returns {"mode": "error", "error": <slug>, "entry_id": <int>, ...}. Common slugs: not_found (entry is a folder, or has no extracted text), method_not_allowed / server_error (v1 server — fall back to get_document_edoc).

laserfiche_document_get_textA

Download a document's server-extracted text (v2-only).

Use for "summarize this document", "what does this say", or any other task that needs the readable contents of a document rather than the raw binary. The text comes from Laserfiche's own extraction pipeline (OCR for image documents, upstream extraction for office files), so you get clean text without having to parse a PDF yourself.

v1 servers do not expose this endpoint. If your deployment is on v1 (the default), this tool returns a structured error at the client layer. Use get_document_edoc(entry_id, mode="text") instead — it fetches the raw edoc and extracts text client-side (pypdf for PDFs, direct decode for text/* MIME types).

Args: entry_id: Integer entry ID of an electronic document (not a folder). max_chars: Truncate the returned text after this many characters (default 50,000). The response's truncated field signals whether truncation occurred.

Returns: {"entry_id": <int>, "text": <str>, "char_count": <int>, "truncated": <bool>} on success.

On failure: returns {"mode": "error", "error": <slug>, "entry_id": <int>, ...}. Common slugs: not_found (entry is a folder, or has no extracted text), method_not_allowed / server_error (v1 server — fall back to get_document_edoc).

get_document_edocA

Download or inspect a document's raw electronic file (edoc).

The recommended path for reading document content on v1 servers (get_document_text has no endpoint to call there). Three modes trade off cost vs. depth:

Args: entry_id: Integer entry ID. Must point to an electronic document, not a folder. mode: "info" (default) — fetches the edoc but returns only its size and content-type, plus a hint. No bytes enter the model's context. Cheapest; safe to call on anything as a first probe.

    ``"bytes"`` — returns the edoc as base64-encoded bytes plus
    content-type and size. Refused if the edoc exceeds
    ``LF_EDOC_MAX_BYTES`` (default 25 MB) — see ``max_bytes``.

    ``"text"`` — extracts readable text server-side:

    - ``application/pdf`` → pypdf, page by page, truncated to
      ``text_char_limit``. Response includes ``pages_total``,
      ``pages_extracted``, ``truncated``.
    - ``text/*`` → decoded directly as UTF-8 (replacement chars
      on bad bytes).
    - Anything else (.docx, .xlsx, images, etc.) → structured
      error naming the content-type and suggesting ``mode="bytes"``
      for client-side handling. OCR is not attempted.
    - Encrypted or malformed PDFs → structured error with the
      underlying exception class.
max_bytes: Per-call override for ``LF_EDOC_MAX_BYTES``. Use to
    raise the cap for a specific large document without changing
    the server-wide default.
text_char_limit: Truncate extracted text after this many
    characters (default 50,000). Truncation is signalled by the
    ``truncated`` field, NOT a marker in the text itself.

Returns: Always a dict. Shape depends on mode — see above. On size-cap refusal, response contains error="size_exceeds_cap" plus byte_size and max_bytes so the LLM can decide whether to raise the cap and retry.

On failure: returns {"mode": "error", "error": <slug>, "entry_id": <int>, ...}. Common slugs: not_found (entry is a folder, or has no edoc), auth_failed.

laserfiche_document_get_edocA

Download or inspect a document's raw electronic file (edoc).

The recommended path for reading document content on v1 servers (get_document_text has no endpoint to call there). Three modes trade off cost vs. depth:

Args: entry_id: Integer entry ID. Must point to an electronic document, not a folder. mode: "info" (default) — fetches the edoc but returns only its size and content-type, plus a hint. No bytes enter the model's context. Cheapest; safe to call on anything as a first probe.

    ``"bytes"`` — returns the edoc as base64-encoded bytes plus
    content-type and size. Refused if the edoc exceeds
    ``LF_EDOC_MAX_BYTES`` (default 25 MB) — see ``max_bytes``.

    ``"text"`` — extracts readable text server-side:

    - ``application/pdf`` → pypdf, page by page, truncated to
      ``text_char_limit``. Response includes ``pages_total``,
      ``pages_extracted``, ``truncated``.
    - ``text/*`` → decoded directly as UTF-8 (replacement chars
      on bad bytes).
    - Anything else (.docx, .xlsx, images, etc.) → structured
      error naming the content-type and suggesting ``mode="bytes"``
      for client-side handling. OCR is not attempted.
    - Encrypted or malformed PDFs → structured error with the
      underlying exception class.
max_bytes: Per-call override for ``LF_EDOC_MAX_BYTES``. Use to
    raise the cap for a specific large document without changing
    the server-wide default.
text_char_limit: Truncate extracted text after this many
    characters (default 50,000). Truncation is signalled by the
    ``truncated`` field, NOT a marker in the text itself.

Returns: Always a dict. Shape depends on mode — see above. On size-cap refusal, response contains error="size_exceeds_cap" plus byte_size and max_bytes so the LLM can decide whether to raise the cap and retry.

On failure: returns {"mode": "error", "error": <slug>, "entry_id": <int>, ...}. Common slugs: not_found (entry is a folder, or has no edoc), auth_failed.

search_naturalA

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.

laserfiche_entry_search_naturalA

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.

search_entriesA

Run a raw Laserfiche search query and return matching entries.

Use when you already know how to express the search in Laserfiche query syntax. If the user describes what they want in natural language and you are unsure how to translate, prefer search_natural (which asks the server for the available templates and field names first). For a simple name-pattern lookup, search_by_name is the cheaper option.

Query syntax cheat sheet:

  • {LF:Name="Onboarding*"} — name pattern (* and ? wildcards)

  • {[Loan Application]:[Last Name]="Smith"} — field on template

  • {LF:LookIn="\Imports\2024"} — restrict to a folder subtree

  • Combine with & (AND) / | (OR), e.g. {LF:Name="*.pdf"} & {[Application]:[Status]="Approved"}

Args: query: A Laserfiche search expression. Quote string values with double quotes; escape inner quotes by doubling them. max_results: Page size (default 25, capped by LF_MAX_RESULTS_CEILING, typically 200).

Returns: SearchResults with entries (id, name, entry_type, full_path), total_count, and next_link. Drill in with get_entry or get_field_values.

On failure: returns {"mode": "error", "error": <slug>, ...} instead of raising. Slugs you might see here: server_error (most common, the SimpleSearches endpoint is fragile on some self-hosted builds — see search_natural for a more resilient path), auth_failed, rate_limited. Full taxonomy in docs/error-contract.md.

laserfiche_entry_searchA

Run a raw Laserfiche search query and return matching entries.

Use when you already know how to express the search in Laserfiche query syntax. If the user describes what they want in natural language and you are unsure how to translate, prefer search_natural (which asks the server for the available templates and field names first). For a simple name-pattern lookup, search_by_name is the cheaper option.

Query syntax cheat sheet:

  • {LF:Name="Onboarding*"} — name pattern (* and ? wildcards)

  • {[Loan Application]:[Last Name]="Smith"} — field on template

  • {LF:LookIn="\Imports\2024"} — restrict to a folder subtree

  • Combine with & (AND) / | (OR), e.g. {LF:Name="*.pdf"} & {[Application]:[Status]="Approved"}

Args: query: A Laserfiche search expression. Quote string values with double quotes; escape inner quotes by doubling them. max_results: Page size (default 25, capped by LF_MAX_RESULTS_CEILING, typically 200).

Returns: SearchResults with entries (id, name, entry_type, full_path), total_count, and next_link. Drill in with get_entry or get_field_values.

On failure: returns {"mode": "error", "error": <slug>, ...} instead of raising. Slugs you might see here: server_error (most common, the SimpleSearches endpoint is fragile on some self-hosted builds — see search_natural for a more resilient path), auth_failed, rate_limited. Full taxonomy in docs/error-contract.md.

search_by_nameA

Find entries by file/folder name pattern, optionally scoped to a folder path.

Use when the user is searching by name and the full Laserfiche query syntax is overkill. This wraps search_entries with a {LF:Name="..."} (plus optional {LF:LookIn="..."}) clause built for you.

Args: name_pattern: A name with optional wildcards — * matches any sequence, ? matches one character. Examples: "Onboarding*" (starts-with), "*.pdf" (ends-with), "Smith,?" (exactly one char after the comma). in_folder_path: Backslash-delimited Laserfiche path to scope the search to. Example: "\Imports\2024". max_results: Page size (default 25, capped by LF_MAX_RESULTS_CEILING).

Returns: same SearchResults shape as search_entries.

On failure: returns {"mode": "error", "error": <slug>, ...}. See docs/error-contract.md. Note that SimpleSearches is the same fragile endpoint behind search_entries — fall back to search_natural if you get repeated server_error results.

laserfiche_entry_search_by_nameA

Find entries by file/folder name pattern, optionally scoped to a folder path.

Use when the user is searching by name and the full Laserfiche query syntax is overkill. This wraps search_entries with a {LF:Name="..."} (plus optional {LF:LookIn="..."}) clause built for you.

Args: name_pattern: A name with optional wildcards — * matches any sequence, ? matches one character. Examples: "Onboarding*" (starts-with), "*.pdf" (ends-with), "Smith,?" (exactly one char after the comma). in_folder_path: Backslash-delimited Laserfiche path to scope the search to. Example: "\Imports\2024". max_results: Page size (default 25, capped by LF_MAX_RESULTS_CEILING).

Returns: same SearchResults shape as search_entries.

On failure: returns {"mode": "error", "error": <slug>, ...}. See docs/error-contract.md. Note that SimpleSearches is the same fragile endpoint behind search_entries — fall back to search_natural if you get repeated server_error results.

list_folderA

List the immediate children (documents and subfolders) of a folder by ID.

Use this for browse-style navigation when the user references a known folder. The root folder is typically ID 1 — start there if you have nothing else. To navigate from a path string, resolve it first with get_entry_by_path. To search across the whole repo, use search_natural or search_entries.

Args: folder_id: Integer entry ID of the parent folder. max_results: Page size (default 25, capped by LF_MAX_RESULTS_CEILING). skip: 0-indexed offset for pagination. Combine with max_results to walk a large folder in chunks; check next_link to know when to stop.

Returns: SearchResults with entries, total_count (server fills it only when the build supports $count), and next_link. Each entry has id, name, entry_type, full_path, creation_time, and last_modified_time. Drill into a single entry with get_entry or get_field_values.

On failure: returns {"mode": "error", "error": <slug>, "folder_id": <int>, ...}. Common slugs: not_found (folder ID doesn't exist), auth_failed (no read permission).

laserfiche_folder_listA

List the immediate children (documents and subfolders) of a folder by ID.

Use this for browse-style navigation when the user references a known folder. The root folder is typically ID 1 — start there if you have nothing else. To navigate from a path string, resolve it first with get_entry_by_path. To search across the whole repo, use search_natural or search_entries.

Args: folder_id: Integer entry ID of the parent folder. max_results: Page size (default 25, capped by LF_MAX_RESULTS_CEILING). skip: 0-indexed offset for pagination. Combine with max_results to walk a large folder in chunks; check next_link to know when to stop.

Returns: SearchResults with entries, total_count (server fills it only when the build supports $count), and next_link. Each entry has id, name, entry_type, full_path, creation_time, and last_modified_time. Drill into a single entry with get_entry or get_field_values.

On failure: returns {"mode": "error", "error": <slug>, "folder_id": <int>, ...}. Common slugs: not_found (folder ID doesn't exist), auth_failed (no read permission).

get_entryA

Fetch metadata for a single entry by ID.

Use this once you have an entry ID (from search, list_folder, or get_entry_by_path) and need the entry's full metadata: name, type (Folder vs Document), full path, parent ID, template name, page count (for paginated documents), and timestamps.

This does NOT return field values — for those, call get_field_values. This does NOT return document content — for that, call get_document_edoc (mode="text" for extracted text, mode="bytes" for the raw file).

Args: entry_id: Integer entry ID.

Returns: EntryDetail (id, name, entry_type, parent_id, full_path, template_name, page_count, is_electronic_document, extension, creation time, last modified time).

On failure: returns {"mode": "error", "error": <slug>, "entry_id": <int>, ...}. Common slugs: not_found, auth_failed.

laserfiche_entry_getA

Fetch metadata for a single entry by ID.

Use this once you have an entry ID (from search, list_folder, or get_entry_by_path) and need the entry's full metadata: name, type (Folder vs Document), full path, parent ID, template name, page count (for paginated documents), and timestamps.

This does NOT return field values — for those, call get_field_values. This does NOT return document content — for that, call get_document_edoc (mode="text" for extracted text, mode="bytes" for the raw file).

Args: entry_id: Integer entry ID.

Returns: EntryDetail (id, name, entry_type, parent_id, full_path, template_name, page_count, is_electronic_document, extension, creation time, last modified time).

On failure: returns {"mode": "error", "error": <slug>, "entry_id": <int>, ...}. Common slugs: not_found, auth_failed.

get_entry_by_pathA

Resolve a backslash-delimited Laserfiche path to its entry.

Use this when the user refers to a location by its name path rather than an ID — typical when they paste a path from the Laserfiche web client, or when you've authored a path from a known folder structure. Once resolved, the returned id feeds into list_folder, get_entry, get_field_values, etc.

Args: full_path: Path from the repository root, backslash-separated. Example: "\Imports\2024\Onboarding\Smith,John". Forward slashes are also accepted.

Returns: EntryDetail — same shape as get_entry.

On failure: returns {"mode": "error", "error": <slug>, "full_path": <str>, ...}. Common slugs: not_found (no entry at that path), auth_failed.

laserfiche_entry_get_by_pathA

Resolve a backslash-delimited Laserfiche path to its entry.

Use this when the user refers to a location by its name path rather than an ID — typical when they paste a path from the Laserfiche web client, or when you've authored a path from a known folder structure. Once resolved, the returned id feeds into list_folder, get_entry, get_field_values, etc.

Args: full_path: Path from the repository root, backslash-separated. Example: "\Imports\2024\Onboarding\Smith,John". Forward slashes are also accepted.

Returns: EntryDetail — same shape as get_entry.

On failure: returns {"mode": "error", "error": <slug>, "full_path": <str>, ...}. Common slugs: not_found (no entry at that path), auth_failed.

get_field_valuesA

Read the template field values currently on an entry.

Use after you have an entry ID and need the metadata fields the user is asking about — e.g. "what's the status of this form?", "who's the assigned reviewer?", "when was this signed?". For the entry's own properties (name, type, path), use get_entry instead.

Args: entry_id: Integer entry ID.

Returns: {"values": [...]} — a list of field-value descriptors under the values key. Each item has field_name, values (always a list, even for single-value fields), field_type, is_multi_value, and is_required. Empty / unset fields are typically omitted by the Repository API rather than returned with empty values, so an empty list usually means the entry has no template assigned.

On failure: returns {"mode": "error", "error": <slug>, "entry_id": <int>, ...}. Common slugs: not_found, auth_failed.

laserfiche_field_values_getA

Read the template field values currently on an entry.

Use after you have an entry ID and need the metadata fields the user is asking about — e.g. "what's the status of this form?", "who's the assigned reviewer?", "when was this signed?". For the entry's own properties (name, type, path), use get_entry instead.

Args: entry_id: Integer entry ID.

Returns: {"values": [...]} — a list of field-value descriptors under the values key. Each item has field_name, values (always a list, even for single-value fields), field_type, is_multi_value, and is_required. Empty / unset fields are typically omitted by the Repository API rather than returned with empty values, so an empty list usually means the entry has no template assigned.

On failure: returns {"mode": "error", "error": <slug>, "entry_id": <int>, ...}. Common slugs: not_found, auth_failed.

get_task_statusA

Look up the status of an async operation by its token.

The async tools (delete_entry, copy_entry, sometimes import_document) return an operation_token instead of the final result — call this to check whether the operation finished. For "wait until done" semantics, use wait_for_task instead so you don't have to write a polling loop.

Args: operation_token: The string token returned by the originating async tool.

Returns: Server's task payload — operationToken, operationType, percentComplete, status (one of NotStarted, InProgress, Completed, Failed, Canceled), redirectUri (set when the op produced a new entry, e.g. after a copy), entryId (the resulting entry's ID when applicable), errors (list — empty on success), and timestamps.

On failure: returns {"mode": "error", "error": <slug>, "operation_token": <str>, ...}. Common slugs: not_found (token unknown — usually expired or from a different server instance), auth_failed.

laserfiche_task_get_statusA

Look up the status of an async operation by its token.

The async tools (delete_entry, copy_entry, sometimes import_document) return an operation_token instead of the final result — call this to check whether the operation finished. For "wait until done" semantics, use wait_for_task instead so you don't have to write a polling loop.

Args: operation_token: The string token returned by the originating async tool.

Returns: Server's task payload — operationToken, operationType, percentComplete, status (one of NotStarted, InProgress, Completed, Failed, Canceled), redirectUri (set when the op produced a new entry, e.g. after a copy), entryId (the resulting entry's ID when applicable), errors (list — empty on success), and timestamps.

On failure: returns {"mode": "error", "error": <slug>, "operation_token": <str>, ...}. Common slugs: not_found (token unknown — usually expired or from a different server instance), auth_failed.

wait_for_taskA

Block until an async operation reaches a terminal state.

Preferred over manual polling with get_task_status. Returns quickly when the op is fast; otherwise polls at poll_interval_seconds until Completed, Failed, or Canceled — or until timeout_seconds is reached, in which case the last observed status is returned with timed_out=true so the caller can decide whether to keep waiting.

Args: operation_token: Token from the originating async tool. timeout_seconds: Maximum time to wait (default 60). Set higher for large folder deletes or large copies. poll_interval_seconds: Delay between status checks (default 1.0). Bounded below at 0.1s.

Returns: Same payload as get_task_status, with an added timed_out boolean indicating whether the wait ended on timeout.

On failure: if a poll call fails mid-wait, returns {"mode": "error", "error": <slug>, "operation_token": <str>, ...}. Common slugs: not_found (token invalidated by server restart), auth_failed.

laserfiche_task_waitA

Block until an async operation reaches a terminal state.

Preferred over manual polling with get_task_status. Returns quickly when the op is fast; otherwise polls at poll_interval_seconds until Completed, Failed, or Canceled — or until timeout_seconds is reached, in which case the last observed status is returned with timed_out=true so the caller can decide whether to keep waiting.

Args: operation_token: Token from the originating async tool. timeout_seconds: Maximum time to wait (default 60). Set higher for large folder deletes or large copies. poll_interval_seconds: Delay between status checks (default 1.0). Bounded below at 0.1s.

Returns: Same payload as get_task_status, with an added timed_out boolean indicating whether the wait ended on timeout.

On failure: if a poll call fails mid-wait, returns {"mode": "error", "error": <slug>, "operation_token": <str>, ...}. Common slugs: not_found (token invalidated by server restart), auth_failed.

task_wait_or_pollA

Check or wait on an async operation. timeout_seconds=0 returns immediately.

Wraps the two underlying tools:

  • timeout_seconds=0get_task_status. Returns the current payload without waiting. Right for "is this done yet?" polling loops written by the caller.

  • timeout_seconds>0 (default 60) → wait_for_task. Polls at poll_interval_seconds until terminal or until the deadline.

Args: operation_token: Token from the originating async tool. timeout_seconds: 0 for single-poll; >0 for blocking wait. Bounded above by what your MCP client tolerates as a tool call duration. poll_interval_seconds: Delay between status checks when waiting. Bounded below at 0.1s. Ignored when timeout_seconds=0.

Returns: Same payload as get_task_status / wait_for_task. The wait variant adds timed_out: bool for deadline misses.

On failure: same shapes as the underlying tools.

laserfiche_task_updateA

Check or wait on an async operation. timeout_seconds=0 returns immediately.

Wraps the two underlying tools:

  • timeout_seconds=0get_task_status. Returns the current payload without waiting. Right for "is this done yet?" polling loops written by the caller.

  • timeout_seconds>0 (default 60) → wait_for_task. Polls at poll_interval_seconds until terminal or until the deadline.

Args: operation_token: Token from the originating async tool. timeout_seconds: 0 for single-poll; >0 for blocking wait. Bounded above by what your MCP client tolerates as a tool call duration. poll_interval_seconds: Delay between status checks when waiting. Bounded below at 0.1s. Ignored when timeout_seconds=0.

Returns: Same payload as get_task_status / wait_for_task. The wait variant adds timed_out: bool for deadline misses.

On failure: same shapes as the underlying tools.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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