From b833e57a2158f0bd4a22fef59600b118801a5e6b Mon Sep 17 00:00:00 2001 From: bgauryy Date: Fri, 17 Oct 2025 16:48:47 +0300 Subject: [PATCH] updated with schemes --- Anthropic/calude_code_cli_tools.md | 497 +++++++++++++++++++++++++++-- 1 file changed, 477 insertions(+), 20 deletions(-) diff --git a/Anthropic/calude_code_cli_tools.md b/Anthropic/calude_code_cli_tools.md index 269d59b..b9d3f86 100644 --- a/Anthropic/calude_code_cli_tools.md +++ b/Anthropic/calude_code_cli_tools.md @@ -77,7 +77,9 @@ interface ReadTool { **JSON Schema Details:** ```json { + "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", + "additionalProperties": false, "required": ["file_path"], "properties": { "file_path": { @@ -86,11 +88,11 @@ interface ReadTool { }, "offset": { "type": "number", - "description": "The line number to start reading from" + "description": "The line number to start reading from. Only provide if the file is too large to read at once" }, "limit": { "type": "number", - "description": "The number of lines to read" + "description": "The number of lines to read. Only provide if the file is too large to read at once." } } } @@ -142,6 +144,7 @@ interface WriteTool { **JSON Schema Details:** ```json { + "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": ["file_path", "content"], "additionalProperties": false, @@ -217,6 +220,7 @@ interface EditTool { **JSON Schema Details:** ```json { + "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": ["file_path", "old_string", "new_string"], "additionalProperties": false, @@ -292,6 +296,7 @@ interface GlobTool { **JSON Schema Details:** ```json { + "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": ["pattern"], "additionalProperties": false, @@ -302,7 +307,7 @@ interface GlobTool { }, "path": { "type": "string", - "description": "The directory to search in. If not specified, the current working directory will be used" + "description": "The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter \"undefined\" or \"null\" - simply omit it for the default behavior. Must be a valid directory path if provided." } } } @@ -350,6 +355,67 @@ interface GrepTool { } ``` +**JSON Schema Details:** +```json +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": ["pattern"], + "additionalProperties": false, + "properties": { + "pattern": { + "type": "string", + "description": "The regular expression pattern to search for in file contents" + }, + "path": { + "type": "string", + "description": "File or directory to search in (rg PATH). Defaults to current working directory." + }, + "output_mode": { + "type": "string", + "enum": ["content", "files_with_matches", "count"], + "description": "Output mode: \"content\" shows matching lines (supports -A/-B/-C context, -n line numbers, head_limit), \"files_with_matches\" shows file paths (supports head_limit), \"count\" shows match counts (supports head_limit). Defaults to \"files_with_matches\"." + }, + "glob": { + "type": "string", + "description": "Glob pattern to filter files (e.g. \"*.js\", \"*.{ts,tsx}\") - maps to rg --glob" + }, + "type": { + "type": "string", + "description": "File type to search (rg --type). Common types: js, py, rust, go, java, etc. More efficient than include for standard file types." + }, + "-i": { + "type": "boolean", + "description": "Case insensitive search (rg -i)" + }, + "-n": { + "type": "boolean", + "description": "Show line numbers in output (rg -n). Requires output_mode: \"content\", ignored otherwise." + }, + "-A": { + "type": "number", + "description": "Number of lines to show after each match (rg -A). Requires output_mode: \"content\", ignored otherwise." + }, + "-B": { + "type": "number", + "description": "Number of lines to show before each match (rg -B). Requires output_mode: \"content\", ignored otherwise." + }, + "-C": { + "type": "number", + "description": "Number of lines to show before and after each match (rg -C). Requires output_mode: \"content\", ignored otherwise." + }, + "multiline": { + "type": "boolean", + "description": "Enable multiline mode where . matches newlines and patterns can span lines (rg -U --multiline-dotall). Default: false." + }, + "head_limit": { + "type": "number", + "description": "Limit output to first N lines/entries, equivalent to \"| head -N\". Works across all output modes: content (limits output lines), files_with_matches (limits file paths), count (limits count entries). When unspecified, shows all results from ripgrep." + } + } +} +``` + **Core Implementation:** - Uses ripgrep binary (explicitly stated) - Default output_mode: "files_with_matches" @@ -380,6 +446,40 @@ interface NotebookEditTool { } ``` +**JSON Schema Details:** +```json +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": ["notebook_path", "new_source"], + "additionalProperties": false, + "properties": { + "notebook_path": { + "type": "string", + "description": "The absolute path to the Jupyter notebook file to edit (must be absolute, not relative)" + }, + "new_source": { + "type": "string", + "description": "The new source for the cell" + }, + "cell_id": { + "type": "string", + "description": "The ID of the cell to edit. When inserting a new cell, the new cell will be inserted after the cell with this ID, or at the beginning if not specified." + }, + "cell_type": { + "type": "string", + "enum": ["code", "markdown"], + "description": "The type of the cell (code or markdown). If not specified, it defaults to the current cell type. If using edit_mode=insert, this is required." + }, + "edit_mode": { + "type": "string", + "enum": ["replace", "insert", "delete"], + "description": "The type of edit to make (replace, insert, delete). Defaults to replace." + } + } +} +``` + **Cell Indexing:** - 0-indexed (first cell is index 0) - Identifies cells by cell_id @@ -401,17 +501,17 @@ interface NotebookEditTool { - "You can use the `run_in_background` parameter to run the command in the background, which allows you to continue working while the command runs" - "**Never use `run_in_background` to run 'sleep' as it will return immediately**. You do not need to use '&' at the end of the command when using this parameter" -**Command Restrictions :** +**Command Restrictions:** - "**Avoid** using Bash with the `find`, `grep`, `cat`, `head`, `tail`, `sed`, `awk`, or `echo` commands, unless explicitly instructed or when these commands are truly necessary for the task" - "**NEVER** use bash for file operations (cat/head/tail, grep, find, sed/awk, echo >/cat <