Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Folio keeps a model of one folder of markdown and data files that it serves to a reader's browser. These tools read that model and change nothing.

Call them at these moments:

  • Before editing, moving or deleting a file: folio_used_by for the documents that include it or read its data, and folio_query over folio.links for the documents linking to it.

  • After editing a document: folio_health with its path, for what the edit broke.

  • Before writing a document of a kind: folio_kinds, for its fields and the rules it keeps.

  • Before quoting a number from a data file in a document: folio_embed, to check the reference that shows it there, such as {value: data/daily.csv#0.rain_mm}.

The reader is the person reading the folder in their browser, usually the user you work for. Call folio_presence, folio_reads, folio_changes, folio_needs and folio_stale only when the user's request is about what they see - this page, this paragraph - have read or must catch up on, or to fit a report to what they have not read yet; never for anything else. These five reveal the reader's reading; while the reader pauses sharing in Folio, they answer only {paused: true, message}.

A Folio must already be serving the folder, and the user starts it - as folio FOLDER, serving on http://localhost:8640/ or the next free port - never you: a running Folio writes into the folder what its FOLIO.md declares. This server reads the Folio at http://localhost:8640/ (--port or --socket chooses). With none there, every call fails: ask the user to start one. While Folio still reads the folder, an answer carries ready: false - ask again shortly.

The served folder is /app/visual/ridge. Paths are relative to it, or absolute under it, with forward slashes - notes/plan.md - and answers name them relative to it.

A list too long for one answer is cut to fit: the answer then adds omitted, the entries each list left out, and narrow, how to ask for less. folio_health, folio_needs, folio_changes, folio_stale and folio_reads take a path - a document, or a folder for what lies under it - and folio_documents a folder.

Which tool answers what:

  • What documents exist, and of which kind: folio_documents.

  • What a document is made of, and its block ids, which other tools take: folio_document.

  • Where a block, value or figure comes from: folio_provenance.

  • What elsewhere in the folder says the same as a block, or answers a question by meaning: folio_related.

  • Questions over data files, or over documents as tables - what links to a page, open tasks, fields: folio_query. What one reference in a document shows: folio_embed.

  • The kinds, fields and rules declared at a path: folio_kinds.

  • Everything wrong - broken links, failing queries, figures their data contradicts: folio_health.

  • What a change to a file would move: folio_used_by.

  • What changed in a period: folio_digest. A document's earlier versions: folio_history.

  • The reader: what they look at now (folio_presence), have read (folio_reads), read that changed since (folio_changes), what needs them (folio_needs), what has outlived its use (folio_stale).

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
folio_documentsA

List every markdown and diagram document under a folder of the served folder, with the kind a FOLIO.md declaration gives it. Use it to see what exists or which documents are of a kind; for documents matching a condition - a title, a field's value, a link - query folio.documents or kind. with folio_query, and for one document's blocks use folio_document. Answers {ready, documents: [{path, kind}]}: kind is null where no declaration places the document; ready false means Folio is still reading the folder and the list is incomplete, so ask again shortly. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

folio_documentA

Read one document as Folio's model holds it: its blocks with their ids, the blocks its page shows once includes are expanded, its declared kind and fields, and the data files it reads. Call it for the block ids that folio_provenance and folio_history take and that a link to a block names - an id is 8 hex characters Folio derives, never invented - and to see what a page is made of; read the file itself for its full text. Answers {path, kind: markdown or mermaid, blocks: [{id, kind, lines: [first, last] from 1, text: its first 100 characters}], page: [{id, kind, source: the file the block comes from, lines, at: its lines in the expanded page, version}], conventions: {declarations, kind, declaredIn, fields}, data: [paths]}. A document Folio has not read yet is an error: ask again shortly. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

folio_provenanceA

Trace one block of a page to its origin: the file and lines it comes from, when it last changed, the data files and queries behind its embedded tables and values with when each changed, and each figure in it checked against its data. Use it to explain why a number or table reads as it does, or whether a figure still matches its data; take the block's id - and, for a block an include brings, its source - from folio_document's page. For every problem in the folder at once use folio_health. An id not on the page is an error. Answers {source, kind, lines: [first, last], changed: ISO time, included: {section} for an included block, data: [{reference, files: [{path, changed}], query, error}], claims: [{figure, reference, state: matching, contradicted or unchecked, live: the data's value, reason, deliberate: true when left unchecked by choice, as a range is}], conventions}. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

folio_relatedA

Find the blocks of other documents closest in meaning to one block of a page, or to a question in your own words - passages that restate a decision or cover the same ground, whether or not anything links them. Folio works this out with a small embedding model on the reader's machine, only for documents below a FOLIO.md whose related section asks for it. Take the block's id from folio_document; a short structural line or a block repeated word for word across documents answers no blocks. For links between documents use folio_query over folio.links. Answers {asked: false} where no declaration asks; else {asked: true, state: {status: installing, downloading, indexing, ready or failed, done, total, message}, related: [{path, block, lines: [first, last], title, text: the block's words, closeness: the cosine of the two vectors, higher is closer}], version}; only status ready answers blocks, so while indexing ask again shortly. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

folio_queryA

Run one read-only DuckDB SELECT over the served folder's data files and its documents as tables, and return the rows. Use it for any question data answers - counts, filters, joins across CSV, JSON, Parquet, SQLite or DuckDB files - and for questions about documents as data: what links to a page (folio.links where target is its path), open tasks, documents of a kind by a field. To read what one reference written in a document shows, use folio_embed. Anything but one SELECT, a path outside the folder and a web address are refused; a query stops after 10 seconds. Answers {columns: [{name, type}], rows, total: the row count, absent when rows were cut, partial: true when rows were cut, files: the data files read}: rows stop at 5,000 or 16 MB, and a long cell is cut at 20,000 characters, fewer when there are more than 10 columns.

folio_embedA

Resolve one data reference as a document writes it in {table: ...}, {value: ...}, a figure or a chart, from that document's folder, and return what it shows there. Use it to check a reference before writing it into a document, or to read the value a page shows; for a question of your own over the data use folio_query. Answers {version, grid: {columns, rows, total, partial} for a table, value: for a reference naming one value, error: why the reference resolves to nothing}. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

folio_kindsA

Read what the FOLIO.md declarations applying at a path declare: the kinds of documents with the fields each carries, the rules - queries whose every row is a violation - and the health entries, layered from the served folder down as Folio applies them. Use it before writing a document of a kind, to learn its fields and the rules it must keep; for one document's own kind and field values use folio_document, and for the rules broken now folio_health. Answers {declarations: [FOLIO.md paths, outermost first], kinds: [{name, declaredIn, where, fields}], rules: [{name, declaredIn, query, message, severity, line and block: where it is declared}], health: [{declaredIn, where, skip, error}]}, every list empty where nothing is declared. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

folio_healthA

List every problem in the served folder, or with path only in that document or under that folder: links to files, headings or blocks not there, includes that find nothing and include loops, figures their data contradicts, diagrams, charts and queries that fail, data that cannot be read, and declarations, fields, rules and saved views a document breaks. Use it after editing documents, given the path of what you edited, to answer which figures disagree with their data, or to find what to fix; for one block's figures in detail use folio_provenance, and for what needs the reader, ranked, folio_needs. It reveals nothing of the reader's reading, and waits while health is being checked. Answers {ready, problems: [{kind: figure, link, include, loop, diagram, chart, query, data, declaration, field, rule or view, path, line, block, severity: error or warning - absent for a problem that is neither, what, anchor: the element to land on, opens: the document showing it when another, occurrence: which of a rule's alike rows}], version: the same while the problems are}; ready false means Folio is still reading the folder, so ask again shortly. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

folio_changesA

List the documents the reader has read before whose blocks changed since they last read them, newest change first - what they have to catch up on; with path, only that document or those under that folder. Use it for what changed for the reader; for every change in the folder over a period, read or not, use folio_digest, and for the marks on one page folio_reads with its path. It reveals which documents the reader has read. While the reader pauses sharing in Folio, it answers only {paused: true, message}. Answers {documents: [{path, blocks: how many changed, at: ISO time of the latest change}], version: the same while the list is}. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

folio_needsA

List what needs the reader's attention, ranked: every error in the folder, then problems in documents they have read, rows of the folder's declared attention queries, and documents they read that changed since; with path, only what lies in that document or under that folder. Use it to triage what to look at first; for every problem whoever reads it use folio_health, and for only the documents changed since read folio_changes. It reveals what the reader has read. While the reader pauses sharing in Folio, it answers only {paused: true, message}. Answers {ready, needs: [{source: error, problem, attention or changed, path, line, block, what, name: the attention query's, at}], version: the same while the list is}; ready false, with no needs, while Folio still reads the folder. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

folio_presenceA

Show what the reader is looking at now: the page open in each browser tab and the block under their pointer with the start of its text, the most recent first. Use it when the reader means what is on their screen - this page, this paragraph; for what they read before use folio_reads. It reveals the reader's screen; a hidden tab shows nothing. While the reader pauses sharing in Folio, it answers only {paused: true, message}. Answers {paused: false, looking: [{page, block: {source, id, text}, at: ISO time}]}. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

folio_staleA

List documents that have probably outlived their use - by default unchanged for a year, never read and linked from nowhere, or what the folder's declared stale query names - each with when its file last changed and why; with path, only that document or those under that folder. Use it to suggest what to archive; Folio only lists them and never moves or deletes anything. For documents the reader should catch up on use folio_changes instead, and for everything wrong in the folder folio_health. It reveals which documents the reader never read. While the reader pauses sharing in Folio, it answers only {paused: true, message}. Answers {ready, documents: [{path, changed: ISO time, why}], version: the same while the list is}; ready false, with no documents, while Folio still reads the folder. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

folio_readsA

Read the reader's read record. For a folder, or with no path, every document read under it and when it was last read; for a document, each block with the version the reader read and when, and the marks its page shows. Use it to tell whether the reader has seen a passage or what is new to them on a page; for the list of documents changed since read use folio_changes. It reveals the reader's reading. While the reader pauses sharing in Folio, it answers only {paused: true, message}. Answers {documents: [{path, at: ISO time}]} for a folder, or for a document {blocks: [{id, kind, source, lines, version, read: {version, at: ISO time} or null}], marks: [{source, id, mark: new or changed, before and after: the text as read and as it is, data: embeds whose data changed - a mark from data alone has no before or after, at: ISO time, parts: the rows, items or lines marked in a table, list or code block}], removed: [{source, id, text, after and before: the ids it stood between, at: ISO time}], links: [{source, id, url, state: changed or gone}], upstream: [{path, how, at}], version}. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

folio_historyA

Read a document's versions, newest first, merged from its git commits and every save Folio saw - a document since deleted included. With version, that version's full text; with block, each text the block has had; with reference, each result that embed has shown. Use it to answer how a passage or a value changed and when; for everything that changed in the folder over a period use folio_digest. Give at most one of version, block and reference. Answers {path, versions: [{id, at: ISO time, seen: a list of saved, committed and file, by: the commit's author, removed}]}, {path, version, text: null when unknown}, {path, block, versions: [{version, at: ISO time, text: absent where the block was not there}]} or {path, reference, results: [{at: ISO time, value or table, error}]}. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

folio_used_byA

List the documents that include a file or whose embeds and queries read it - the pages a change to it moves. Use it before editing, moving or deleting a document, data file or query file; it does not list links, so for what links to a document query folio.links with folio_query. Answers {ready, documents: [{source, how: includes or embeds}]}; ready false, with no documents, while Folio still reads the folder. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

folio_digestA

Summarize what changed in the served folder over a period: every document created, changed or removed, with the versions it started and ended on, and every embedded value that moved, before and after. Use it for what changed this week or since a date across the whole folder, read or not; for what changed of what the reader read use folio_changes, and for one document's versions folio_history. Answers {from, to, documents: [{path, status: created, changed or removed, from, to: version ids folio_history takes}], values: [{document, reference, before, after, at}]}, times ISO 8601. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.4/5.0

Scored across 16 tools

Disambiguation4/5

Most tools are clearly distinct, and descriptions actively disambiguate near-neighbors by naming the alternative ('for what changed of what the reader read use folio_changes, and for one document's versions folio_history'). There are nonetheless two overlapping clusters — folio_changes/folio_digest/folio_history/folio_reads (what changed or was read) and folio_health/folio_needs/folio_stale (what is wrong or needs attention) — plus folio_query vs folio_embed, which an agent must read closely to separate.

Naming Consistency5/5

Every tool uses the identical folio_ prefix followed by a single lowercase noun, with no camelCase or verb-style outliers anywhere in the set. The pattern is fully predictable, so an agent can reliably guess and remember names.

Tool Count4/5

At 16 tools the surface sits just above the comfortable range, but the domain is genuinely broad (reading state, provenance, embeddings, health, history, digests, impact analysis) and each tool maps to a distinct capability rather than a variant of another. A couple of the analysis tools could plausibly be folded together, but nothing is filler.

Completeness4/5

The read/analysis lifecycle is well covered: discovery, per-document structure, provenance, data querying, semantic relations, health, change tracking, history, and impact analysis before edits. The notable gap is that there are no mutation tools at all — no create/update/move — so writing is left to external file editing, which the descriptions implicitly assume ('use it after editing documents').

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues