Safe, atomic file operations MCP server for AI agents — edit files, escape SQL/shell, sync via SSH
Strong tool definitions with complete schemas and descriptions for all 12 tools. Naming follows verb_noun convention (read_file, edit_lines, write_file, etc.). Descriptions are detailed (100-250 chars) and explain WHAT the tool does and WHEN to use it. Input schemas are well-formed with types, descriptions, and constraints (minimum values, enums, defaults). However, output schemas are not documented, LLMs cannot predict return structure. Error handling descriptions are absent; tools don't explain recovery paths. Parameter relationships (e.g., insert_lines 'after' vs 'before' mutual exclusivity) are mentioned but not enforced in schema. SSH tools (fetch, sync) expose host/port/key_path as parameters, should validate these are not secrets. Overall solid foundation but missing output documentation and error guidance.
Audit a SQL query for escaping issues and potential problems. Checks for: unmatched quotes, unescaped quotes in strings, backticks that cause shell command substitution, $ variables that cause shell expansion, SQL injection patterns.
Delete a range of lines from a file (1-based, inclusive). Uses atomic write with automatic backup.
Replace a range of lines in a file by line numbers (1-based, inclusive). Uses atomic write with automatic backup and permission preservation. Validates line count after write and auto-restores on failure.
Escape a string for safe use in SQL queries or shell commands. For SQL: supports mysql, postgresql, sqlite dialects. For shell: wraps in single quotes with proper escaping of internal quotes. For heredoc: wraps multi-line content in a heredoc block for safe shell execution.
Download a file from a remote host via scp. Useful for bringing remote files locally for editing.
Get file metadata: size, line count, permissions, owner.
Output schemas not documented. LLMs cannot predict return structure (fields, types, pagination). Tools like read_file, get_file_info, and list operations must document what they return.
insert_lines parameter relationship not enforced in schema. Description says 'Specify either after or before, not both' but schema allows both. Add oneOf constraint or explicit validation.
SSH tools (fetch, sync) expose key_path as a parameter. If this can contain secrets, it violates secret-injection pattern. Use server-side SSH key injection via environment or config instead.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 61 | 2026-07-28+ | v2 |
Insert content after or before a specific line number. Specify either 'after' or 'before', not both.
Read the contents of a file. Returns full text and line-by-line content. Useful for examining files before editing them.
Restore a file from its .qd3_fsutils.bak backup.
Upload a local file to a remote host via rsync. Optionally sets owner and permissions on remote. Creates remote backup before overwriting.
Validate file integrity: checks existence, non-empty, valid UTF-8. Optionally checks syntax for JSON/YAML/XML.
Atomically write full content to a file. Uses temp file + atomic rename. Preserves permissions. Validates checksum after write and auto-restores on failure.
No error handling guidance in tool descriptions. Tools like delete_lines and sync are destructive but don't explain what errors are retryable, what requires user intervention, or recovery steps.
Destructive operations (delete_lines, write_file, sync) lack confirmation or dry-run support. Agents make mistakes, no safety gate before irreversible actions.