MCP server for SMB/CIFS file share access — list, read, and search files via the Model Context Protocol.
Four read-only tools with solid naming (verb_noun pattern) and comprehensive descriptions (150-250 chars each). All tools have input schemas with type definitions and parameter descriptions. However, output schemas are documented only in prose descriptions, not as formal JSON Schema. Parameter descriptions are thorough but lack explicit constraints (e.g., max_depth max:10 stated in text but not in schema). No error handling guidance for LLMs (e.g., 'If file not found, try search_files first'). Security is strong (read-only, path traversal prevention), but no tool annotations (readOnlyHint) present. Composition is clean, each tool has one responsibility and tools chain well (search_files returns paths that read_file accepts).
Return metadata for a file or directory on the SMB share without reading its contents. Args: path: Relative path to the file or directory within the share. Forward or back slashes are both accepted. Parent directory traversal (..) is not permitted. Returns: JSON object with keys: name, type ("file"|"directory"), size_bytes, modified_time (UTC ISO 8601), created_time (UTC ISO 8601).
List files and directories at the given path on the SMB share. Args: path: Relative path within the share (empty string = root of share). Forward or back slashes are both accepted. Parent directory traversal (..) is not permitted. Returns: JSON object with key "entries": array of objects with keys: name, type ("file"|"directory"), size (bytes, null for dirs). Includes "truncated": true and a "note" when results are capped at 200 entries.
Read the contents of a file from the SMB share. Args: path: Relative path to the file within the share. Forward or back slashes are both accepted. Parent directory traversal (..) is not permitted. Returns: File contents as a string, or a JSON error object. If the file exceeds MAX_FILE_SIZE_MB, the first READ_PREVIEW_LINES lines are returned with a truncation notice (set READ_PREVIEW_LINES=0 to hard-error instead). Binary files are identified by size but their contents are not returned.
Search for files whose names match a glob pattern within a directory subtree. Args: pattern: Glob pattern to match against filenames. MUST include a wildcard (*) to match multiple files, e.g. "*.txt", "*.csv", "report_*", "*budget*". To find a specific file by exact name, pass the full filename, e.g. "notes.txt". Patterns without a wildcard only match files with that exact name. path: Relative path to the directory to search within (default: share root). Forward or back slashes are both accepted. Parent directory traversal (..) is not permitted. max_depth: Maximum directory depth to recurse into (default: 5, max: 10). Use 1 to search only the immediate directory. Returns: JSON object with key "results": array of objects with keys: path (relative to share root), name, size_bytes. Includes "truncated": true and a "note" when capped at 200 results. Denied files are excluded silently.
Output schemas documented only in prose, not as formal JSON Schema. LLMs cannot parse field types, cardinality, or required fields from descriptions alone.
No error recovery guidance. Descriptions lack hints like 'If file not found, try search_files()' or 'If path denied, check ALLOWED_PATHS config'. LLMs cannot self-correct on failures.
No tool annotations. All tools are read-only but lack readOnlyHint annotation. Agents cannot infer safety properties from tool metadata.
Numeric constraints stated in descriptions but not in JSON Schema. max_depth 'max: 10' is prose; should be maxValue in schema. LLMs may not respect text-only constraints.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | B | 70 | <=2025-11-25 | v2 |
Result truncation (200 entries/results) is mentioned in descriptions but not formalized. No 'next_cursor' or 'has_more' field documented for pagination.