一键导入
nim-mcp-tools
// Use for Nim symbol navigation and diagnostics. MANDATORY: Use specialized MCP tools (nimFindSymbols, nimFindReferences, nimListSymbols, nimCheckFile, nimCheckProject) first; fall back to grep only on error or user confirmation.
// Use for Nim symbol navigation and diagnostics. MANDATORY: Use specialized MCP tools (nimFindSymbols, nimFindReferences, nimListSymbols, nimCheckFile, nimCheckProject) first; fall back to grep only on error or user confirmation.
| name | nim-mcp-tools |
| description | Use for Nim symbol navigation and diagnostics. MANDATORY: Use specialized MCP tools (nimFindSymbols, nimFindReferences, nimListSymbols, nimCheckFile, nimCheckProject) first; fall back to grep only on error or user confirmation. |
AI agents MUST prefer specialized MCP tools over general-purpose instruments (grep, shell commands, read_file with manual parsing) for all Nim symbol-related and Nim diagnostics tasks. This is critical for:
If the user asks to find, rename, remove, audit, update, standardize naming, or fix issues/project of a Nim symbol or its usages, this skill MUST be used first and the workflow must start with the Nim MCP symbol tools.
If the user asks to check a single Nim file for errors, warnings, hints, diagnostics, issues, problems, or compiler feedback, this skill MUST be used first and the workflow must start with nimCheckFile.
If the user asks to check a Nim project for errors, warnings, hints, diagnostics, issues, problems, compiler feedback, or to "fix" it, this skill MUST be used first and the workflow must start with nimCheckProject.
This applies to requests phrased as:
Foo"Foo"Foo everywhere"Foo"Foo defined?"foo.nim"Treat user wording such as project, workspace, repository, repo, package, codebase, checkout, and module tree as referring to the current Nim project context when they are asking for project-wide diagnostics.
Treat user wording such as file, module (when a concrete Nim file is identified), source file, and explicit *.nim paths as referring to single-file diagnostics when they are asking for diagnostics for one file.
Do not pair nimFindSymbols, nimCheckFile, or nimCheckProject with grep, ripgrep, or shell search "just to double-check". If the task is about a Nim symbol or Nim diagnostics, MCP tools own the search unless they have already failed.
kindUsers may ask for symbol categories using looser or non-strict terminology. AI agents MUST map that wording to the exact Nim MCP kind values before filtering results from nimListSymbols(...) or nimFindSymbols(...).
The MCP server returns Nim-oriented kind names derived from nimsuggest symbol kinds with the leading sk removed, such as Const, EnumField, Field, Iterator, Converter, Let, Macro, Method, Proc, Template, Type, Var, and Func.
Use these terminology mappings when interpreting user requests:
Func and ProcFuncFunc, Proc, Method, Iterator, Converter, Macro, and TemplateTypeVar and LetFieldEnumFieldConstInterpret user wording semantically, not literally. For example:
kind == Typekind in {Var, Let}kind in {Func, Proc} unless the surrounding context clearly asks for all callableskind == FunccamelCase) across the project.Do NOT grep for the name.
nimFindSymbols(query: "SymbolName") to get exact path, line, and column.nimFindReferences(path, line, column).Use this workflow for "usages", "references", "call sites", and cleanup requests such as removing all definitions of and references to a symbol.
Do NOT read the whole file to find definitions.
nimListSymbols(path: "path/to/file.nim").kind values that correspond to the user's terminology.nimFindSymbols(query: "query").Do NOT approximate file diagnostics by reading the file manually or by running a project-wide diagnostic request when the user asked about one file.
nimCheckFile(path: "path/to/file.nim").Use this workflow for requests phrased as checking a specific file, source file, module, or explicit *.nim path for Nim issues.
Do NOT approximate project diagnostics by grepping build logs or manually scanning files.
nimCheckProject().Use this workflow for requests phrased as checking the current project, workspace, repository, repo, package, codebase, checkout, or module tree for Nim issues.
Use this when asked to fix casing, follow a style guide, or rename symbols to the standard camelCase (as per standard Nim convention).
nimListSymbols(path: "path/to/file.nim") to retrieve the symbols that need to be standardized.nimFindReferences(path, line, column) to identify all of its usages and call sites across the project.camelCase to ensure consistency and adherence to Nim's standard style.nimCheckFile(path: "path/to/file.nim") to verify that the changes are correct and no errors were introduced.Use this when asked to "fix issues", "fix project", or "fix the repo".
nimCheckProject() to find all diagnostics in the project.nimCheckProject() returns no more issues.nimFindSymbols and nimFindReferences to find all variations of symbol usage in the project.Specialized Nim MCP tools are the primary instrument. General-purpose tools (grep, ripgrep, shell commands) are secondary and their use is governed by the following rules:
grep_search or other general-purpose tools to fulfill the request.
When falling back:
grep, ripgrep, or grep_search to find Nim symbols or references unless the MCP tools have explicitly errored out.nimListSymbols instead.nimCheckProject when nimCheckFile can return structured diagnostics for the specific file the user asked about.nimCheckProject can return structured project diagnostics.nimFindSymbols("Foo") and then running rg "Foo" anyway.rg for "find all usages" when nimFindReferences is available.nimListSymbols can return directly.nimCheckProject() when the user asked to check one specific Nim file and nimCheckFile is available.nimCheckFile can return structured diagnostics for it.nimCheckProject is available.