fixup! fixup! fixup! Add Docker usage instructions to README

This commit is contained in:
2026-03-12 10:42:39 +00:00
parent 34d4401280
commit db803c6950
8 changed files with 38 additions and 268 deletions
+4 -61
View File
@@ -1,6 +1,6 @@
# MCP Filepuff API Reference
> Auto-generated on 2026-01-28
> Auto-generated on 2026-03-12
This document provides detailed API documentation for all MCP tools available in filepuff.
@@ -24,7 +24,6 @@ This document provides detailed API documentation for all MCP tools available in
- [`find_references`](#find_references)
### Edit Operations
- [`edit_preview`](#edit_preview)
- [`edit_apply`](#edit_apply)
---
@@ -47,10 +46,9 @@ Health check - returns pong to verify the server is running
{"tool": "ping"}
```
**Returns:** `"pong"` text string.
**Notes:**
- Returns: "pong"
- Use to verify server connectivity
---
@@ -85,8 +83,6 @@ Search for text patterns in files using ripgrep. Supports regex patterns, file t
{"pattern": "TODO", "ignore_case": true, "context_lines": 3}
```
**Returns:** Results grouped by file with match context. Format: `"Found N matches in M files:"` followed by file sections, each with matching lines prefixed by `"L{line}│"` and context lines prefixed by `" │"`.
**Notes:**
- Requires ripgrep (rg) to be installed
@@ -131,8 +127,6 @@ Read a file's contents with optional line range and AST symbol summary
{"path": "large_file.go", "max_lines": 100}
```
**Returns:** File content with numbered lines (format: `" 12│ line text"`). When `include_ast=true`: prepends symbol summary (`"**file.go** (N lines, go)\nSymbols:\n func Name L12\n struct Config L45"`). When `symbols_only=true`: returns only the symbol summary (~95% fewer tokens). When `max_lines` is set: truncates output with `"[... N more lines omitted]"` notice.
**Notes:**
- symbols_only mode reduces token usage by ~90-98%
@@ -175,8 +169,6 @@ Search for AST patterns in code files. Use code patterns with $VAR placeholders
{"pattern": "function $NAME($PROPS) { $$$BODY }", "language": "javascript", "name_matches": "^[A-Z]"}
```
**Returns:** `"Found N match(es):"` followed by entries in format `"**file:line** (node_type)"` with code blocks and captured variables (`$NAME=value`). Returns `"No matches found."` when no results.
**Notes:**
- $NAME captures identifiers
@@ -208,8 +200,6 @@ Get information about the symbol at a specific position in a file. Returns type,
{"file": "server.go", "line": 25, "column": 10}
```
**Returns:** `"**Symbol Information**"` followed by hover/type information from LSP, or `"**Symbol Information** (AST fallback)"` with node type and text when LSP unavailable. Returns `"No symbol information available at this position."` when nothing is found.
**Notes:**
- Requires LSP server for full type information
@@ -237,11 +227,10 @@ Find the definition of the symbol at a specific position. Uses LSP to locate whe
{"file": "server.go", "line": 42, "column": 15}
```
**Returns:** `"Found N definition(s):"` with entries showing `"**file:line:column**"` and a 3-line code preview with the target line marked by `">"`. Returns `"No definition found."` when the symbol has no definition.
**Notes:**
- Requires language server for the file type
- Returns file path, line, and column of definition
- Shows code preview at definition location
---
@@ -271,8 +260,6 @@ Find all references to the symbol at a specific position. Uses LSP to locate all
{"file": "server.go", "line": 42, "column": 15, "include_declaration": false}
```
**Returns:** `"Found N reference(s):"` grouped by file, each showing `"**file** (count)"` with locations as `"L{line}:{column}"`. Returns `"No references found."` when no usages exist.
**Notes:**
- Requires language server for the file type
@@ -282,49 +269,6 @@ Find all references to the symbol at a specific position. Uses LSP to locate all
### Edit Operations
#### `edit_preview`
Preview an edit without applying it. Uses AST-aware editing for code files (Go, TypeScript, JavaScript, Python, C, C++), and text-based editing for other files (Markdown, JSON, YAML, config files, etc.).
🔒 **Read-only**: This tool does not modify files.
**Parameters:**
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `file` | `string` | **Yes** | Path to the file to edit |
| `operation` | `string` | **Yes** | Edit operation: replace, insert_before, insert_after, delete |
| `new_content` | `string` | No | New content (required for replace/insert operations) |
| `selector_kind` | `string` | No | AST node type to match (e.g., function_declaration, class_declaration). For code files only. |
| `selector_name` | `string` | No | Name of the symbol to match. For code files only. |
| `selector_line` | `number` | No | Line number (1-indexed). For AST mode: narrows search. For text mode: start of line range. |
| `selector_index` | `number` | No | Index of the match to use if multiple matches found (default: 0) |
| `selector_line_end` | `number` | No | End line number for range selection (text mode). Used with selector_line. |
| `selector_text` | `string` | No | Exact text to match (text mode). Must be unique or use selector_index. |
| `selector_pattern` | `string` | No | Regex pattern to match (text mode). Must be unique or use selector_index. |
**Examples:**
```json
{"file": "server.go", "operation": "replace", "selector_kind": "function_declaration", "selector_name": "Hello", "new_content": "func Hello() {\\n\\tprintln(\\"New Hello\\")\\n}"}
```
```json
{"file": "README.md", "operation": "replace", "selector_text": "## Installation", "new_content": "## Getting Started"}
```
```json
{"file": "package.json", "operation": "replace", "selector_pattern": "\\"version\\":\\\\s*\\"[^\\"]+\\"", "new_content": "\\"version\\": \\"2.0.0\\""}
```
**Returns:** `"**Edit Preview**"` followed by a unified diff showing proposed changes. Does not modify the file. For code files: uses AST-aware mode with syntax validation. For other files: uses text-based mode.
**Notes:**
- Use to validate changes before applying
---
#### `edit_apply`
Apply an edit to a file. Uses AST-aware editing for code files (Go, TypeScript, JavaScript, Python, C, C++) with syntax validation, and text-based editing for other files (Markdown, JSON, YAML, config files, etc.).
@@ -356,10 +300,9 @@ Apply an edit to a file. Uses AST-aware editing for code files (Go, TypeScript,
{"file": "config.yaml", "operation": "replace", "selector_line": 5, "selector_line_end": 10, "new_content": "database:\\n host: production.db.example.com\\n port: 5432"}
```
**Returns:** `"**Edit Applied Successfully**"` followed by a unified diff of the changes made. For code files, validates syntax before writing — returns an error if the edit would produce invalid syntax.
**Notes:**
- For code files: validates syntax before and after edit
- Preserves file permissions
- Uses atomic writes for safety
- File locking prevents concurrent edits