API reference
The public declarations of @chrismichaelps/pudu-lang-mcp 0.1.1.
PuduLangMcp
Serves one client over stdin and stdout; answers the exit status.
PuduLangMcp.App.Completion
Answers the values that could complete one argument.
PuduLangMcp.App.Context
Contexttype@App.Context.Context — toolchain, workspace, corpus, and index for handlers
The context for a toolchain, workspace, and corpus, with the index building in the background.
The reference index, waiting a bounded time while it is still being built.
Whether the reference-index wait has reached its deadline.
IndexStatetype@App.Context.IndexState — progress of the background reference index
PuduLangMcp.App.Discovery
The features this server implements.
Answers
server/discover: versions, capabilities, and instructions.Answers
initializefor a negotiated legacy version.Answers a legacy
ping.
PuduLangMcp.App.Dispatch
The state before any input.
The next state and every reply line for one input line.
The handler of every stateless method, by method name.
Statetype@App.Dispatch.State — the session carried between input lines
PuduLangMcp.App.Prompts
Answers one prompt rendered with its arguments.
Answers one page of the prompts.
PuduLangMcp.App.Resources
INDEX_URI: StrconstThe table of contents of the documentation.
Answers one page of the documentation resources.
Answers the contents of one resource.
What every module-reference URI begins with.
Answers the module-reference template.
PuduLangMcp.App.Tools.Compiler
Answers the compiler's diagnostics for the code.
Answers the code as the formatter lays it out.
Answers the linter's findings for the code.
Answers a confined run's exit status and output.
Answers the report of the workspace's tests, or of those under one path.
PuduLangMcp.App.Tools.Docs
GROUPS: Array[Str]constThe groups a document can belong to.
Answers one document, or one of its sections.
Answers the best-matching documentation sections for
query.
PuduLangMcp.App.Tools.Language
Answers the quick fixes offered at a position.
Answers what could be written at a position.
Answers where the name at a position is declared, with its source.
Answers every declaration in the code.
Answers the type and documentation at a position.
Answers every use of the name at a position.
Answers the edits a rename would make, without applying them.
Answers the signature of the call around a position.
Answers declarations across the workspace whose names match the query.
PuduLangMcp.App.Tools.Reference
Every public declaration of one module, rendered.
Answers every public declaration of the module the
moduleargument names.Answers declarations matching a name, description, or type shape.
PuduLangMcp.App.Tools.Registry
Answers one tool call: its result text, or a tool error the model can act on.
Every tool's handler, by tool name.
Answers one page of the tool catalogue.
A complete tool result carrying one text block.
PuduLangMcp.App.Tools.Status
Answers the server's version, toolchain, library, workspace, index, and corpus.
PuduLangMcp.Constants.Protocol
CACHE_PRIVATE: StrconstCache scope for results that depend on this machine.
CACHE_PUBLIC: StrconstCache scope for results any client may share.
INTERNAL_ERROR: IntconstThe server failed while answering.
INVALID_PARAMS: IntconstThe parameters are wrong, including a missing resource or cursor.
INVALID_REQUEST: IntconstThe JSON is not a valid request or notification.
Whether a version is one an
initializemay select.JSONRPC_VERSION: StrconstThe
jsonrpcmember every message carries.The version an
initializereceives when it asks for one not supported.Handshake-era versions an
initializemay select, newest first.Metadata key holding the capabilities a modern client declares per request.
META_KEY: StrconstThe member of
paramsand of a result that holds protocol metadata.Metadata key naming the protocol version of one modern request.
Metadata key under which every result names this server.
The method does not exist in the era the request was admitted under.
MODERN_VERSION: StrconstThe per-request protocol version this server serves statelessly.
PARSE_ERROR: IntconstThe line is not JSON.
RESULT_COMPLETE: StrconstThe
resultTypeof every final result.Every version this server accepts, modern first.
The requested protocol version is not one this server speaks.
PuduLangMcp.Constants.Server
Deadline for check, format, lint, and reference commands.
Search results answered when the caller names no limit.
DOC_CHARS: IntconstMost characters of one document or reference answered at once.
DOCS_TTL_MS: IntconstFreshness hint for documentation reads.
ENV_PUDU_BIN: StrconstEnvironment variable naming the
puduexecutable to use.ENV_PUDU_LIB: StrconstEnvironment variable naming the standard library directory to use.
ENV_WORKSPACE: StrconstEnvironment variable naming the workspace root.
INDEX_WAIT_MS: IntconstLongest a request waits for the background reference index.
INSTRUCTIONS: StrconstGuidance for a model, returned by discovery and
initialize.LIST_TTL_MS: IntconstFreshness hint for tool, prompt, resource, and discovery lists.
LSP_TIMEOUT_MS: IntconstDeadline for one language-server conversation.
MAX_LINE_BYTES: IntconstThe longest message line accepted, in bytes.
The longest deadline a caller may ask a run or test for.
The most search results a caller may ask for.
Most bytes kept from each stream of a child process.
PAGE_SIZE: IntconstItems per page of a list result.
REFERENCE_CHUNK: IntconstFiles per reference-indexing run.
Most bytes kept from one reference-indexing run, whose JSON covers every imported module.
Deadline for one chunk of reference indexing.
Reference-indexing runs at once.
RUN_TIMEOUT_MS: IntconstDefault deadline for
pudu_runandpudu_test.SERVER_NAME: StrconstThe name reported in
serverInfo.SERVER_TITLE: StrconstThe display name reported in
serverInfo.SERVER_VERSION: StrconstThis server's version; matches
pudu.toml.STDLIB_TTL_MS: IntconstFreshness hint for standard-library reads.
PuduLangMcp.Domain.Catalog.Arguments
Argstype@Domain.Catalog.Arguments.Args — validated arguments of one call
A validated integer argument.
A validated integer argument, or a fallback when it was not given.
A validated string argument.
Arguments checked against a tool's spec, or the first problem found.
PuduLangMcp.Domain.Catalog.Prompts
Every prompt, in listing order.
CONVENTIONS: StrconstLanguage rules and the verification workflow, appended to every prompt.
PromptArgumenttype@Domain.Catalog.Prompts.PromptArgument — one named prompt input
PromptSpectype@Domain.Catalog.Prompts.PromptSpec — one prompt described once
A prompt's description and user message, or why its arguments are refused.
A prompt as
prompts/listdescribes it.
PuduLangMcp.Domain.Catalog.ToolSpec
Annotationstype@Domain.Catalog.ToolSpec.Annotations — behaviour hints every tool declares
An integer argument bounded to
minimum..maximum.Kindtype@Domain.Catalog.ToolSpec.Kind — JSON kind of one argument
The JSON Schema type name of an argument kind.
Propertytype@Domain.Catalog.ToolSpec.Property — one declared tool argument
A string argument.
A tool as
tools/listdescribes it.ToolSpectype@Domain.Catalog.ToolSpec.ToolSpec — one tool described once
PuduLangMcp.Domain.Catalog.Tools
Every tool, in listing order.
The tool with a name.
PuduLangMcp.Domain.Code.SourceFile
The path under a source root that a module's file must have.
Whether text is a dotted module name.
The name a
moduledeclaration gives, when the source begins with a valid one.The module a source-root-relative file declares by its path, when the path is a module path.
PuduLangMcp.Domain.Docs.Chapter
Every section of every document, in corpus order.
The address of a heading: lowercase words joined by dashes.
Chaptertype@Domain.Docs.Chapter.Chapter — one published document by group
The document with a group and slug.
The documents of one group, in corpus order.
Sectiontype@Domain.Docs.Chapter.Section — a document cut at second-level headings
The section of a document matching a heading or anchor.
A document cut into sections at its second-level headings.
One line per document with its sections indented beneath it.
PuduLangMcp.Domain.Docs.Search
Hittype@Domain.Docs.Search.Hit — a ranked documentation section
How well one section answers a query; zero when no term matches.
The best-matching sections, highest score first.
The distinct search terms of a query, stop words removed.
PuduLangMcp.Domain.Lsp.Conversation
Answertype@Domain.Lsp.Conversation.Answer — result and diagnostics from a transcript
The question's answer and the published diagnostics in a transcript.
Every framed message of one question, from handshake to exit.
One message with its
Content-Lengthheader.The question's parameters, with the position made 0-based.
Questiontype@Domain.Lsp.Conversation.Question — one question at 1-based position
PuduLangMcp.Domain.Lsp.Render
Code action titles, one per line.
Completion items, one per line, at most
limit.Diagnostics, one per line with position, severity, and code.
A document's declarations, nested ones indented.
The hover contents as text.
Locationtype@Domain.Lsp.Render.Location — a 1-based position in a shown path
A location as
path:line:character.Every location in a definition or references result.
The active signature, its active parameter, and its documentation.
The edits of a rename, one per line.
Matching declarations with where each is.
PuduLangMcp.Domain.Protocol.Negotiation
The era governing one request, or the refusal to answer it with.
Eratype@Domain.Protocol.Negotiation.Era — version governing one admitted request
Whether a method opens a legacy session.
The legacy version an
initializereceives.Sessiontype@Domain.Protocol.Negotiation.Session — the only process-scoped protocol state
PuduLangMcp.Domain.Protocol.Pagination
The
cursorparameter, when there is one.One page of a list and the cursor of the next, if any remain.
PuduLangMcp.Domain.Reference.Decode
The exported declarations in
pudu doc --jsonoutput, each once.The qualified names
pudu api --jsonreports as public.
PuduLangMcp.Domain.Reference.Entry
Entrytype@Domain.Reference.Entry.Entry — one public declaration
Foundtype@Domain.Reference.Entry.Found — a ranked declaration match
Every module named by the entries, sorted.
The entries of one module, in catalogue order.
One declaration with its signature and indented documentation.
Every declaration of one module; empty when the module is unknown.
The best-matching declarations, highest score first.
PuduLangMcp.Domain.Rpc.Message
PuduLangMcp.Domain.Rpc.Reply
Cachetype@Domain.Rpc.Reply.Cache — caching hint for complete results
A complete result body: the given fields plus
resultType,serverInfo, and any cache hint.The reply line carrying an error; the id is
nullwhen it could not be read.The reply line carrying a result.
PuduLangMcp.Errors.RpcError
The JSON-RPC error code for a refusal.
Structured error data, for the refusals that carry it.
The error message for a refusal, with its detail.
ProtocolErrortype@Errors.RpcError.ProtocolError — every protocol-level refusal
PuduLangMcp.Errors.ToolError
One sentence saying what went wrong and what to do next.
ToolFailuretype@Errors.ToolError.ToolFailure — failures reported as tool results
PuduLangMcp.Generated.Docs
REVISION: Strconst@Generated.Docs.Corpus — published Pudu prose, generated; do not edit
PuduLangMcp.Services.Lsp
The language server's answer to one question, or why there is none.
PuduLangMcp.Services.Process.Bounded
Whether a child has reached its execution deadline.
Finishedtype@Services.Process.Bounded.Finished — what a bounded child left behind
Runs
programto its end or its deadline and answers everything it wrote, within the cap.At most
limitbytes as text, cut on a character boundary, and whether anything was cut.
PuduLangMcp.Services.Reference
The public declarations of every file, from the compiler's reference output.
The file of one module.
The public declarations of one module's file.
ModuleFiletype@Services.Reference.ModuleFile — one importable module and its file
Every module file of the standard library and the workspace's installed packages.
PuduLangMcp.Services.Toolchain
A finished run with a status and output, for scripted toolchains.
The standard library an installed or development compiler uses.
The toolchain this machine has, located from the environment.
A toolchain that answers from a function instead of a process.
Toolchaintype@Services.Toolchain.Toolchain — compiler location, library, version, and runner
PuduLangMcp.Services.Workspace
The workspace rooted at a directory, canonicalized when it exists.
The workspace named by
PUDU_MCP_ROOT, else the current directory.A path relative to the workspace root when it is inside it.
The real location of
pathinside the workspace, or why it is refused.Targettype@Services.Workspace.Target — the file one command reads
Runs
useon the filesourceorpathnames; scratch files are removed afterwards.Workspacetype@Services.Workspace.Workspace — the directory path arguments stay inside
PuduLangMcp.Utils.JsonAccess
A boolean member, or
Nonewhen absent or of another kind.An integer member, or
Nonewhen absent or of another kind.The JSON Schema type name of a value.
A member of an object, or
None.An object's members in order; empty for any other value.
The integer at a path of member names, or
None.The string at a path of member names, or
None.A string member, or
Nonewhen absent or of another kind.A JSON array of strings.
PuduLangMcp.Utils.TextBounds
Text of at most
limitcharacters, with a line saying how much was cut.Text with line breaks and tabs folded into single spaces.
widthcharacters around the first match ofneedle, on one line.
PuduLangMcp.Utils.Uri
The
file://URI of an absolute path.The path a
file://URI names, orNonefor any other scheme.The part of a URI after
scheme, orNonewhen it has another scheme.
