Pudu programming language
Menu
Package

@chrismichaelps / pudu-lang-mcp

Model Context Protocol server for Pudu language documentation and compiler tools

0.1.1Apache-2.01

InstallClose

Tools.md

Markdown89 lines2.9 KB

GitHub ↗

Tools (catalogue)


type: module path: "@root/src/PuduLangMcp/Domain/Catalog/Tools.pudu" fidelity: Active domain: "[[domain/Tool]]" grammar: "[[grammar/pudu]]" depth_score: 0.3 depth_status: SHALLOW coupling: 1 interface_stability: 0.7 tags: [module, shallow] aliases: [Tool Catalogue]


Purpose

The list of every tool this server offers, in the fixed order tools/list answers.

Interface

Signatures

export fn all() -> Array[ToolSpec.ToolSpec]
export fn find(name: Str) -> Option[ToolSpec.ToolSpec]
ToolArgumentsAnnotations
pudu_docs_searchquery, group?, limit?read-only, idempotent, closed
pudu_docs_readslug, group?, section?read-only, idempotent, closed
pudu_reference_searchquery, limit?read-only, idempotent, closed
pudu_module_referencemoduleread-only, idempotent, closed
pudu_checksource or pathread-only, idempotent, closed
pudu_formatsource or pathread-only, idempotent, closed
pudu_lintsource or pathread-only, idempotent, closed
pudu_runsource, timeoutMs?read-only, not idempotent, closed
pudu_testpath?, timeoutMs?not read-only, not destructive, not idempotent, open
pudu_hoversource or path, line, characterread-only, idempotent, closed
pudu_definitionsamesame
pudu_referencessamesame
pudu_completionsamesame
pudu_signature_helpsamesame
pudu_code_actionssamesame
pudu_rename_previewsame plus newNameread-only (edits are returned, not applied)
pudu_document_symbolssource or pathread-only, idempotent, closed
pudu_workspace_symbolsqueryread-only, idempotent, closed
pudu_toolchainnoneread-only, idempotent, closed

Positions are 1-based lines and characters, as an editor shows them.

Linkage

  • Requires: [[src/PuduLangMcp/Domain/Catalog/ToolSpec]], [[src/PuduLangMcp/Constants/Server]].
  • Consumed by: [[src/PuduLangMcp/App/Tools/Registry]].

Algorithm

Data; find is a linear lookup by name.

Negative Logic (Prohibited Paths)

  • No tool name appears twice.

Edge Cases

  • pudu_run is read-only because it always runs confined: no files, processes, network, or foreign code.
  • pudu_test runs the project's own suites, which may do anything a test does, so it is neither read-only nor closed-world.

Depth

DEPTH 0.3 (SHALLOW). Data.

Grill Log

  • Q: 1-based or 0-based positions? A: 1-based: models read line numbers off listings and diagnostics, which are 1-based; the conversion to the language server's 0-based positions is one place ([[src/PuduLangMcp/Domain/Lsp/Conversation]]).
  • Q: One pudu_lsp tool with a method argument, or one tool per question? A: One per question; a model chooses among named tools more reliably than among enum values.

Referenced by

[[src/PuduLangMcp/Domain/Catalog/_MOC]]