Skip to main content
Glama
balalaika-ai

narya-mcp

Official
by balalaika-ai

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NARYA_BINNoPath to the Narya binary. Without configuration the server runs NARYA_BIN (or narya on PATH) in the directory of the file.
NARYA_MCP_LOGNoSet to 0 to disable telemetry.
NARYA_MCP_JAILNoRefuses files outside the given directory.
NARYA_MCP_TOOLSNoTools offered (used in end-to-end benchmark arms).
NARYA_MCP_CONFIGNoTOML files listed (separated by ':') whose root contains the file.
NARYA_MCP_LOG_DIRNoDirectory for telemetry logs. Default ~/.local/state/narya-mcp.
NARYA_MCP_TRUSTEDNoDirectory listed in NARYA_MCP_TRUSTED where trusted files are allowed to use narya, launcher and [env] from config.

Instructions

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

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

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

Tools

Functions exposed to the LLM to take actions

NameDescription
narya_check_fileA

Typecheck a .ny file with a fresh Narya run (the authoritative check; slow: every import is loaded again).

Use it for the final verdict. While iterating on a file, keep a session instead: narya_start once, then edit the file and call narya_sync, which rechecks only the commands that changed. Returns ok (Narya accepted the file), clean (ok, with no assumed axioms and no open holes), errors with file/line/column, warnings, axioms assumed, holes, timing. Narya stops at the first error in a file. source_only=True ignores compiled .nyo files and rechecks every import from source (slow; for final checks). If loading compiled imports triggers a Narya anomaly, the file is rechecked from source automatically.

narya_checkA

Typecheck a snippet of Narya commands (defs, echo, synth, ...).

With file: in the context of that file (its imports and all its definitions), using a session for the file (an open one is reused, otherwise one is started and kept, so later checks are fast); the snippet's definitions are undone afterwards. This is the way to try out a lemma next to the code that needs it. Without file: a fresh run in which the snippet must bring its own import "..." lines (relative to directory); a snippet with holes fails, since open holes are an error at end of input.

narya_auditB

Audit a file for unsound shortcuts: explicit axiom commands and holes in the file and its whole import closure (static scan following import/export statements), plus, if typecheck=True, a batch check reporting the axioms Narya actually assumed. verdict is "clean" only if nothing was found and the check passed.

narya_tocA

Outline of a .ny file: its commands (def/axiom/notation/import/...) with names and line ranges, and which definitions contain holes. Static; does not run Narya.

narya_searchA

Find declarations (lemmas, definitions, types) by name, words or meaning; Narya itself has no search command.

query may be words ("loop space of the circle"), identifiers or parts of them ("concat inverse"), a book label ("lem:circle-loopspace") or an exact name (ranked first). The index covers names, signatures, the comment above each declaration and the project's annotation files. With file (and optionally line), only declarations importable there are returned. With session_id and hole, the constants in the hole's type are added to the query and the scope is the session's file. kind: def, axiom, data, codata or record.

narya_lookupB

The full source of a declaration by exact name, with its location, comment and annotations (all files that define the name).

narya_startA

Start an interactive session (a live Narya process) and return its session_id and open holes.

With file: load the file command by command up to and including the command containing line (default: the whole file), stopping at the first error (error_at, messages). Holes created by the file are listed with their position in the file, context and type. With imports (module paths as in import "...", relative to directory or the file's directory): import them first; without a file this gives a scratch session for narya_exec / narya_synth. The first load of heavy imports can take a while; afterwards commands are fast. source_only=True loads imports from source instead of compiled files (slower; used automatically when loading compiled imports triggers a Narya anomaly).

narya_syncA

Re-read the session's file after edits: retract the commands from the first changed one on (Narya undo) and replay the file up to and including the command containing line (default: the whole file). Unchanged commands, including all imports, are kept. Also moves the session backwards when line is earlier.

narya_holesB

List the open holes of a session: number, position in the file (when known), context and type.

narya_execA

Run Narya commands in a session (def, axiom, echo, synth, notation, import, show, undo, ...), one after the other, stopping at the first failure. Returns each command's output, messages and new holes. Definitions made here are not in the file; narya_sync retracting past them undoes them too.

narya_solveA

Fill hole hole with term, checked in the hole's context (the term may contain new ? holes, which are returned). This cannot be undone in Narya. The file is not modified: the result has an edit saying where the hole is in the file; apply it, and keep the session in sync with narya_sync when you next need it.

narya_splitB

Ask Narya for the shape of a solution of a hole without committing it. Without term: split on the goal type (abstraction for a function type, tuple for a record, comatch for codata, constructor for a one-constructor datatype). With term (or comma-separated terms) of a datatype: a match with one branch per constructor.

narya_tryA

Check up to 20 candidate terms against a hole's type, in its context, without solving it. Returns which candidates typecheck (with error messages for the others) and the first success. Commit with narya_solve.

narya_synthA

Synthesize the type of term (Narya synth), or with normalize=True also normalize it (Narya echo). With hole, the term is elaborated in that hole's context (its variables are in scope). Nothing is committed. Only synthesizing terms work (constants, applications, ascriptions (t : T)); a bare abstraction does not.

narya_closeC

Close a session and stop its Narya process.

narya_sessionsA

List live sessions (file, how far it is loaded, idle time, whether the file changed since).

narya_healthB

Toolchain check: which project configuration applies (to file, or the default project), how Narya is run, its version, and the live sessions with their memory use where measurable.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 17 tools

Disambiguation4/5

Most tools target distinct operations (file check vs snippet check vs session exec; search vs lookup; audit vs holes), so misselection risk is low. However, narya_health slightly overlaps narya_sessions by listing sessions, and the hole-oriented tools narya_try/synth/split, while differentiated in the descriptions, are close enough to warrant care.

Naming Consistency5/5

All tools follow the same narya_ snake_case prefix with predictable verb/noun forms. There is no mixed casing or inconsistent verb style across the set.

Tool Count4/5

17 tools is slightly above the typical 3-15 range, but each maps to a distinct Narya workflow such as sessions, holes, checking, search, and audit. The set is coherent and not redundant, though it is somewhat heavy.

Completeness5/5

The surface covers the full interactive proof lifecycle: start/sync/exec/close sessions, check/audit/outline files, list/try/solve/split holes, and search/lookup declarations. No critical operation appears missing for the stated purpose.

Maintenance

ActivityMaintained
ResponsivenessNo issues