A .NET implementation of the Model Context Protocol (MCP) server with built-in local tools for filesystem operations and process execution
The Mcp.Net Agent server provides 4 filesystem tools with consistent naming (verb_noun pattern: edit_file, glob_files, grep_files, list_files) and reasonably detailed descriptions. All tools have input schemas with type definitions and parameter descriptions. However, there are significant gaps: (1) No output schemas are documented, the code does not show what structure tools return, forcing LLMs to guess downstream field names. (2) Parameter descriptions are present but lack explicit constraints, ranges, format specifications, and error recovery guidance are absent or vague. (3) Error handling is implemented internally (seen in EditFileTool.cs with CreateErrorResult calls) but the schema does not document error response structures or recovery patterns that LLMs need. (4) Security considerations for path traversal and input validation exist in code but are not reflected in tool descriptions, leaving LLMs unaware of constraints. (5) The policy-driven design (FileSystemToolPolicy) centralizes limits but these are not surfaced in parameter descriptions, reducing transparency.
Edits an existing text file inside the configured local filesystem scope using optimistic concurrency. Call read_file first, pass its contentHash as expectedContentHash, and provide one or more exact oldText/newText replacements.
Finds files in the configured local filesystem scope using a glob pattern. Matches are deterministic, capped by a result limit, and display relative paths when they stay under the configured base path.
Searches file contents within the configured local filesystem scope using ripgrep when available on the host. Returns deterministic line-numbered matches with bounded output. Paths stay relative when they remain under the configured base path.
Lists files and directories from the configured local filesystem scope. The optional path is resolved from the configured base path and defaults to the current directory '.'.
No output schemas documented for any tool. LLMs cannot determine what fields to expect in responses, forcing them to guess field names for downstream tool calls or data extraction. This violates pattern:tool and pattern:response-shaper and will cause repeated lookup failures and context waste.
Parameter descriptions reference policy-driven limits (e.g., 'clamped to policy limit', 'defaults to the policy limit') without stating the actual values. LLMs cannot reason about constraints if the limits are opaque. Limits should be explicit in descriptions or declared as parameter bounds (minimum, maximum in JSON Schema).
Error handling and recovery patterns are not documented in tool descriptions. EditFileTool returns errors like 'missing_path', 'missing_content_hash', 'too_many_edits', but the tool schema and description don't document these failure modes or how to recover. LLMs need explicit guidance (e.g., 'if contentHash mismatch, call read_file again').
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 67 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 0 | - | v1 |
Security constraints (path traversal prevention, filesystem scope boundaries) are enforced in code but not documented in tool descriptions. LLMs don't understand the configured base path concept or that relative paths are resolved from it. Descriptions should explicitly state: 'Paths are resolved from the configured base path and cannot escape it via '../' sequences.'
edit_file requires expectedContentHash but the tool description doesn't explain that this is an optimistic concurrency control feature or when it becomes optional (policy-driven). Description should clarify: 'Call read_file first to obtain the current contentHash, then pass it here to detect concurrent edits. If the file was modified since you read it, this call will fail with reason=content_hash_mismatch.'
grep_files mentions ripgrep as optional ('when available on the host') but doesn't document fallback behavior or warn about differences between ripgrep regex syntax and standard regex. LLMs may pass patterns that work in ripgrep but fail elsewhere, or vice versa.
glob_files and list_files don't document the format of returned paths, are they relative to the base path, absolute, or always relative? The description mentions 'relative paths when they stay under the configured base path' but this is unclear (when do they become absolute?). This ambiguity will cause path resolution errors.