| httprr trace v1 |
| 14628 2230 |
| POST https://api.anthropic.com/v1/messages HTTP/1.1
|
| Host: api.anthropic.com
|
| User-Agent: Go-http-client/1.1
|
| Content-Length: 14430
|
| Anthropic-Version: 2023-06-01
|
| Content-Type: application/json
|
|
|
| { |
| "model": "claude-3-7-sonnet-20250219", |
| "messages": [ |
| { |
| "role": "user", |
| "content": [ |
| { |
| "type": "text", |
| "text": "What tools are available to you? Please just list them briefly. (Do not call the title tool.)", |
| "cache_control": { |
| "type": "ephemeral" |
| } |
| } |
| ] |
| } |
| ], |
| "max_tokens": 8192, |
| "tools": [ |
| { |
| "name": "bash", |
| "description": "Executes a shell command using bash -c with an optional timeout, returning combined stdout and stderr.\nWhen run with background flag, the process may keep running after the tool call returns, and\nthe agent can inspect the output by reading the output files. Use the background task when, for example,\nstarting a server to test something. Be sure to kill the process group when done.", |
| "input_schema": { |
| "type": "object", |
| "required": [ |
| "command" |
| ], |
| "properties": { |
| "command": { |
| "type": "string", |
| "description": "Shell script to execute" |
| }, |
| "timeout": { |
| "type": "string", |
| "description": "Timeout as a Go duration string, defaults to 1m if background is false; 10m if background is true" |
| }, |
| "background": { |
| "type": "boolean", |
| "description": "If true, executes the command in the background without waiting for completion" |
| } |
| } |
| } |
| }, |
| { |
| "name": "keyword_search", |
| "description": "\nkeyword_search locates files with a search-and-filter approach.\nUse when navigating unfamiliar codebases with only conceptual understanding or vague user questions.\n\nEffective use:\n- Provide a detailed query for accurate relevance ranking\n- Prefer MANY SPECIFIC terms over FEW GENERAL ones (high precision beats high recall)\n- Order search terms by importance (most important first)\n- Supports regex search terms for flexible matching\n\nIMPORTANT: Do NOT use this tool if you have precise information like log lines, error messages, stack traces, filenames, or symbols. Use direct approaches (rg, cat, etc.) instead.\n", |
| "input_schema": { |
| "type": "object", |
| "required": [ |
| "query", |
| "search_terms" |
| ], |
| "properties": { |
| "query": { |
| "type": "string", |
| "description": "A detailed statement of what you're trying to find or learn." |
| }, |
| "search_terms": { |
| "type": "array", |
| "items": { |
| "type": "string" |
| }, |
| "description": "List of search terms in descending order of importance." |
| } |
| } |
| } |
| }, |
| { |
| "name": "think", |
| "description": "Think out loud, take notes, form plans. Has no external effects.", |
| "input_schema": { |
| "type": "object", |
| "required": [ |
| "thoughts" |
| ], |
| "properties": { |
| "thoughts": { |
| "type": "string", |
| "description": "The thoughts, notes, or plans to record" |
| } |
| } |
| } |
| }, |
| { |
| "name": "title", |
| "description": "Sets the conversation title.", |
| "input_schema": { |
| "type": "object", |
| "properties": { |
| "title": { |
| "type": "string", |
| "description": "Brief title (3-6 words) in imperative tense. Focus on core action/component." |
| } |
| }, |
| "required": [ |
| "title" |
| ] |
| } |
| }, |
| { |
| "name": "precommit", |
| "description": "Creates a git branch for tracking work and provides git commit message style guidance. MANDATORY: You must use this tool before making any git commits.", |
| "input_schema": { |
| "type": "object", |
| "properties": { |
| "branch_name": { |
| "type": "string", |
| "description": "A 2-3 word alphanumeric hyphenated slug for the git branch name" |
| } |
| }, |
| "required": [ |
| "branch_name" |
| ] |
| } |
| }, |
| { |
| "name": "done", |
| "description": "Use this tool when you have achieved the user's goal. The parameters form a checklist which you should evaluate.", |
| "input_schema": { |
| "$schema": "http://json-schema.org/draft-07/schema#", |
| "title": "Checklist", |
| "description": "A schema for tracking checklist items with status and comments", |
| "type": "object", |
| "required": [ |
| "checklist_items" |
| ], |
| "properties": { |
| "checklist_items": { |
| "type": "object", |
| "description": "Collection of checklist items", |
| "properties": { |
| "wrote_tests": { |
| "$ref": "#/definitions/checklistItem", |
| "description": "If code was changed, tests were written or updated." |
| }, |
| "passes_tests": { |
| "$ref": "#/definitions/checklistItem", |
| "description": "If any commits were made, tests pass." |
| }, |
| "code_reviewed": { |
| "$ref": "#/definitions/checklistItem", |
| "description": "If any commits were made, the codereview tool was run and its output was addressed." |
| }, |
| "git_commit": { |
| "$ref": "#/definitions/checklistItem", |
| "description": "Create git commits for any code changes you made, adding --trailer 'Co-Authored-By: sketch \u003chello@sketch.dev\u003e' and --trailer 'Change-ID: s$(openssl rand -hex 8)k'. The git user is already configured correctly." |
| } |
| }, |
| "additionalProperties": { |
| "$ref": "#/definitions/checklistItem" |
| } |
| } |
| }, |
| "definitions": { |
| "checklistItem": { |
| "type": "object", |
| "required": [ |
| "status" |
| ], |
| "properties": { |
| "status": { |
| "type": "string", |
| "description": "Current status of the checklist item", |
| "enum": [ |
| "yes", |
| "no", |
| "not applicable", |
| "other" |
| ] |
| }, |
| "description": { |
| "type": "string", |
| "description": "Description of what this checklist item verifies" |
| }, |
| "comments": { |
| "type": "string", |
| "description": "Additional comments or context for this checklist item" |
| } |
| } |
| } |
| } |
| } |
| }, |
| { |
| "name": "codereview", |
| "description": "Run an automated code review.", |
| "input_schema": { |
| "type": "object", |
| "properties": {} |
| } |
| }, |
| { |
| "name": "multiplechoice", |
| "description": "Present the user with an quick way to answer to your question using one of a short list of possible answers you would expect from the user.", |
| "input_schema": { |
| "type": "object", |
| "description": "The question and a list of answers you would expect the user to choose from.", |
| "properties": { |
| "question": { |
| "type": "string", |
| "description": "The text of the multiple-choice question you would like the user, e.g. 'What kinds of test cases would you like me to add?'" |
| }, |
| "responseOptions": { |
| "type": "array", |
| "description": "The set of possible answers to let the user quickly choose from, e.g. ['Basic unit test coverage', 'Error return values', 'Malformed input'].", |
| "items": { |
| "type": "object", |
| "properties": { |
| "caption": { |
| "type": "string", |
| "description": "The caption, e.g. 'Basic coverage', 'Error return values', or 'Malformed input' for the response button. Do NOT include options for responses that would end the conversation like 'Ok', 'No thank you', 'This looks good'" |
| }, |
| "responseText": { |
| "type": "string", |
| "description": "The full text of the response, e.g. 'Add unit tests for basic test coverage', 'Add unit tests for error return values', or 'Add unit tests for malformed input'" |
| } |
| }, |
| "required": [ |
| "caption", |
| "responseText" |
| ] |
| } |
| } |
| }, |
| "required": [ |
| "question", |
| "responseOptions" |
| ] |
| } |
| }, |
| { |
| "name": "browser_navigate", |
| "description": "Navigate the browser to a specific URL and wait for page to load", |
| "input_schema": { |
| "type": "object", |
| "properties": { |
| "url": { |
| "type": "string", |
| "description": "The URL to navigate to" |
| } |
| }, |
| "required": [ |
| "url" |
| ] |
| } |
| }, |
| { |
| "name": "browser_click", |
| "description": "Click the first element matching a CSS selector", |
| "input_schema": { |
| "type": "object", |
| "properties": { |
| "selector": { |
| "type": "string", |
| "description": "CSS selector for the element to click" |
| }, |
| "wait_visible": { |
| "type": "boolean", |
| "description": "Wait for the element to be visible before clicking" |
| } |
| }, |
| "required": [ |
| "selector" |
| ] |
| } |
| }, |
| { |
| "name": "browser_type", |
| "description": "Type text into an input or textarea element", |
| "input_schema": { |
| "type": "object", |
| "properties": { |
| "selector": { |
| "type": "string", |
| "description": "CSS selector for the input element" |
| }, |
| "text": { |
| "type": "string", |
| "description": "Text to type into the element" |
| }, |
| "clear": { |
| "type": "boolean", |
| "description": "Clear the input field before typing" |
| } |
| }, |
| "required": [ |
| "selector", |
| "text" |
| ] |
| } |
| }, |
| { |
| "name": "browser_wait_for", |
| "description": "Wait for an element to be present in the DOM", |
| "input_schema": { |
| "type": "object", |
| "properties": { |
| "selector": { |
| "type": "string", |
| "description": "CSS selector for the element to wait for" |
| }, |
| "timeout_ms": { |
| "type": "integer", |
| "description": "Maximum time to wait in milliseconds (default: 30000)" |
| } |
| }, |
| "required": [ |
| "selector" |
| ] |
| } |
| }, |
| { |
| "name": "browser_get_text", |
| "description": "Get the innerText of an element", |
| "input_schema": { |
| "type": "object", |
| "properties": { |
| "selector": { |
| "type": "string", |
| "description": "CSS selector for the element to get text from" |
| } |
| }, |
| "required": [ |
| "selector" |
| ] |
| } |
| }, |
| { |
| "name": "browser_eval", |
| "description": "Evaluate JavaScript in the browser context", |
| "input_schema": { |
| "type": "object", |
| "properties": { |
| "expression": { |
| "type": "string", |
| "description": "JavaScript expression to evaluate" |
| } |
| }, |
| "required": [ |
| "expression" |
| ] |
| } |
| }, |
| { |
| "name": "browser_scroll_into_view", |
| "description": "Scroll an element into view if it's not visible", |
| "input_schema": { |
| "type": "object", |
| "properties": { |
| "selector": { |
| "type": "string", |
| "description": "CSS selector for the element to scroll into view" |
| } |
| }, |
| "required": [ |
| "selector" |
| ] |
| } |
| }, |
| { |
| "name": "browser_screenshot", |
| "description": "Take a screenshot of the page or a specific element", |
| "input_schema": { |
| "type": "object", |
| "properties": { |
| "selector": { |
| "type": "string", |
| "description": "CSS selector for the element to screenshot (optional)" |
| }, |
| "format": { |
| "type": "string", |
| "description": "Output format ('base64' or 'png'), defaults to 'base64'", |
| "enum": [ |
| "base64", |
| "png" |
| ] |
| } |
| } |
| } |
| }, |
| { |
| "name": "browser_read_image", |
| "description": "Read an image file (such as a screenshot) and encode it for sending to the LLM", |
| "input_schema": { |
| "type": "object", |
| "properties": { |
| "path": { |
| "type": "string", |
| "description": "Path to the image file to read" |
| } |
| }, |
| "required": [ |
| "path" |
| ] |
| } |
| }, |
| { |
| "name": "patch", |
| "description": "File modification tool for precise text edits.\n\nOperations:\n- replace: Substitute text with new content\n- append_eof: Append new text at the end of the file\n- prepend_bof: Insert new text at the beginning of the file\n- overwrite: Replace the entire file with new content (automatically creates the file)\n\nUsage notes:\n- All inputs are interpreted literally (no automatic newline or whitespace handling)\n- For replace operations, oldText must appear EXACTLY ONCE in the file", |
| "input_schema": { |
| "type": "object", |
| "required": [ |
| "path", |
| "patches" |
| ], |
| "properties": { |
| "path": { |
| "type": "string", |
| "description": "Absolute path to the file to patch" |
| }, |
| "patches": { |
| "type": "array", |
| "description": "List of patch requests to apply", |
| "items": { |
| "type": "object", |
| "required": [ |
| "operation", |
| "newText" |
| ], |
| "properties": { |
| "operation": { |
| "type": "string", |
| "enum": [ |
| "replace", |
| "append_eof", |
| "prepend_bof", |
| "overwrite" |
| ], |
| "description": "Type of operation to perform" |
| }, |
| "oldText": { |
| "type": "string", |
| "description": "Text to locate for the operation (must be unique in file, required for replace)" |
| }, |
| "newText": { |
| "type": "string", |
| "description": "The new text to use (empty for deletions)" |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| ], |
| "system": [ |
| { |
| "text": "You are an expert coding assistant and architect.\nYou are assisting the user to achieve their goals.\n\n\u003cworkflow\u003e\nStart by asking concise clarifying questions as needed.\nOnce the intent is clear, work autonomously.\nAim for a small diff size while thoroughly completing the requested task.\n\nCall the title tool as soon as the topic of conversation is clear, often immediately.\n\nBreak down the overall goal into a series of smaller steps.\n(The first step is often: \"Make a plan.\")\nThen execute each step using tools.\nUpdate the plan if you have encountered problems or learned new information.\n\nWhen in doubt about a step, follow this broad workflow:\n\n- Think about how the current step fits into the overall plan.\n- Do research. Good tool choices: bash, think, keyword_search\n- Make edits.\n- Repeat.\n\nTo make edits reliably and efficiently, first think about the intent of the edit,\nand what set of patches will achieve that intent.\nThen use the patch tool to make those edits. Combine all edits to any given file into a single patch tool call.\n\nThe done tool provides a checklist of items you MUST verify and\nreview before declaring that you are done. Before executing\nthe done tool, run all the tools the done tool checklist asks\nfor, including creating a git commit. Do not forget to run tests.\n\u003c/workflow\u003e\n\n\u003csystem_info\u003e\n\u003cplatform\u003e\nlinux/amd64\n\u003c/platform\u003e\n\u003cpwd\u003e\n/\n\u003c/pwd\u003e\n\u003c/system_info\u003e\n\n\u003cgit_info\u003e\n\u003cgit_root\u003e\n\n\u003c/git_root\u003e\n\u003cHEAD\u003e\n\n\u003c/HEAD\u003e\n\u003c/git_info\u003e\n\n", |
| "type": "text", |
| "cache_control": { |
| "type": "ephemeral" |
| } |
| } |
| ] |
| }HTTP/2.0 200 OK
|
| Anthropic-Organization-Id: 3c473a21-7208-450a-a9f8-80aebda45c1b
|
| Anthropic-Ratelimit-Input-Tokens-Limit: 200000
|
| Anthropic-Ratelimit-Input-Tokens-Remaining: 200000
|
| Anthropic-Ratelimit-Input-Tokens-Reset: 2025-05-10T13:34:48Z
|
| Anthropic-Ratelimit-Output-Tokens-Limit: 80000
|
| Anthropic-Ratelimit-Output-Tokens-Remaining: 80000
|
| Anthropic-Ratelimit-Output-Tokens-Reset: 2025-05-10T13:34:52Z
|
| Anthropic-Ratelimit-Requests-Limit: 4000
|
| Anthropic-Ratelimit-Requests-Remaining: 3999
|
| Anthropic-Ratelimit-Requests-Reset: 2025-05-10T13:34:47Z
|
| Anthropic-Ratelimit-Tokens-Limit: 280000
|
| Anthropic-Ratelimit-Tokens-Remaining: 280000
|
| Anthropic-Ratelimit-Tokens-Reset: 2025-05-10T13:34:48Z
|
| Cf-Cache-Status: DYNAMIC
|
| Cf-Ray: 93d9d0e80caa67fe-SJC
|
| Content-Type: application/json
|
| Date: Sat, 10 May 2025 13:34:52 GMT
|
| Request-Id: req_011CNywHj3Qrj3hEz9qFRVgK
|
| Server: cloudflare
|
| Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
|
| Via: 1.1 google
|
| X-Robots-Tag: none
|
|
|
| {"id":"msg_014KGRNEmFdTUGqDQN7sRmzc","type":"message","role":"assistant","model":"claude-3-7-sonnet-20250219","content":[{"type":"text","text":"Here are the tools available to me:\n\n1. bash - Executes shell commands\n2. keyword_search - Searches files with given keywords\n3. think - For recording thoughts, notes, and plans\n4. title - Sets conversation title\n5. precommit - Creates git branches and provides commit message guidance\n6. done - Marks task completion with a checklist\n7. codereview - Runs automated code review\n8. multiplechoice - Presents multiple choice options to the user\n9. Browser tools:\n - browser_navigate - Opens a URL\n - browser_click - Clicks elements\n - browser_type - Types text into elements\n - browser_wait_for - Waits for elements\n - browser_get_text - Gets text from elements\n - browser_eval - Runs JavaScript in browser\n - browser_scroll_into_view - Scrolls to elements\n - browser_screenshot - Takes screenshots\n - browser_read_image - Reads image files\n10. patch - Makes precise text modifications to files"}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":4,"cache_creation_input_tokens":3376,"cache_read_input_tokens":0,"output_tokens":236}} |