diff --git a/src/tool_schemas.py b/src/tool_schemas.py index 2006be9c..a0dd392d 100644 --- a/src/tool_schemas.py +++ b/src/tool_schemas.py @@ -187,7 +187,7 @@ FUNCTION_TOOL_SCHEMAS = [ "type": "function", "function": { "name": "create_document", - "description": "Create a new document in the editor panel. Use this when the user asks to write, create, build, or generate code, scripts, programs, games, apps, or any substantial content (>15 lines) AND there is no already-open document/email draft that the request refers to. If an email compose draft is open, edit that draft instead of creating another document. NEVER put large code blocks directly in chat — use this tool instead.", + "description": "DOCUMENT PANEL (not disk) — Create a new document in the editor panel. Use this when the user asks to write, create, build, or generate code, scripts, programs, games, apps, or any substantial content (>15 lines) AND there is no already-open document/email draft that the request refers to. If an email compose draft is open, edit that draft instead of creating another document. NEVER put large code blocks directly in chat — use this tool instead. For files on disk use write_file.", "parameters": { "type": "object", "properties": { @@ -203,7 +203,7 @@ FUNCTION_TOOL_SCHEMAS = [ "type": "function", "function": { "name": "edit_document", - "description": "Edit a document OPEN IN THE EDITOR PANEL (created via create_document) — NOT a file on disk. For files on disk (home folder, project files, anything with a path like ~/x.txt or /path/to/file) use edit_file instead. Targeted find-and-replace with multiple FIND/REPLACE pairs per call; use for any edit smaller than a full rewrite. Do NOT send the whole file back via update_document for small edits.", + "description": "DOCUMENT PANEL (not disk) — Edit a document OPEN IN THE EDITOR PANEL (created via create_document) — NOT a file on disk. For files on disk (home folder, project files, anything with a path like ~/x.txt or /path/to/file) use edit_file instead. Targeted find-and-replace with multiple FIND/REPLACE pairs per call; use for any edit smaller than a full rewrite. Do NOT send the whole file back via update_document for small edits.", "parameters": { "type": "object", "properties": { @@ -752,15 +752,16 @@ FUNCTION_TOOL_SCHEMAS = [ "type": "function", "function": { "name": "manage_documents", - "description": "Manage documents: list all documents (with optional search/language filter), delete documents, or run tidy cleanup.", + "description": "DOCUMENT PANEL (not disk) — List, read, delete, or tidy library documents. Use action=list to find documents, then action=read with document_id to view one (supports offset/limit for pagination). The document opens in the editor panel — click its title link or use action=read. Do NOT use read_file for library documents; use this tool instead.", "parameters": { "type": "object", "properties": { - "action": {"type": "string", "enum": ["list", "delete", "tidy"]}, - "document_id": {"type": "string", "description": "Document ID (for delete)"}, + "action": {"type": "string", "enum": ["list", "read", "view", "open", "get", "delete", "tidy"]}, + "document_id": {"type": "string", "description": "Document ID (for read, delete)"}, "search": {"type": "string", "description": "Search query (for list)"}, "language": {"type": "string", "description": "Filter by language (for list)"}, - "limit": {"type": "integer", "description": "Max results (for list, default 50)"} + "limit": {"type": "integer", "description": "Max results (for list, default 50) or max chars to read (for read, default 8000)"}, + "offset": {"type": "integer", "description": "Char offset for paginated reading (for read, default 0)"} }, "required": ["action"] }