blob: 68cb57a32a1a61a981f3480bb7c0cd76ddeabc03 [file] [log] [blame]
httprr trace v1
20362 2598
POST https://api.anthropic.com/v1/messages HTTP/1.1
Host: api.anthropic.com
User-Agent: Go-http-client/1.1
Content-Length: 20164
Anthropic-Version: 2023-06-01
Content-Type: application/json
{
"model": "claude-sonnet-4-20250514",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What tools are available to you? Please just list them briefly. (Do not call the set-slug 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 10s 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": "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)"
}
}
}
}
}
}
},
{
"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": "todo_read",
"description": "Reads the current todo list. Use frequently to track progress and understand what's pending.",
"input_schema": {
"type": "object",
"properties": {}
}
},
{
"name": "todo_write",
"description": "todo_write: Creates and manages a structured task list for tracking work and communicating progress to users. Use early and often.\n\nUse for:\n- multi-step tasks\n- complex work\n- when users provide multiple requests\n- conversations that start trivial but grow in scope\n- when users request additional work (directly or via feedback)\n\nSkip for:\n- trivial single-step tasks\n- purely conversational exchanges\n\nUpdate dynamically as work evolves - conversations can spawn tasks, simple tasks can become complex, and new discoveries may require additional work.\n\nRules:\n- Update immediately when task states or task list changes\n- Only one task \"in-progress\" at any time\n- Each update completely replaces the task list - include all tasks (past and present)\n- Never modify or delete completed tasks\n- Queued and in-progress tasks may be restructured as understanding evolves\n- Tasks should be atomic, clear, precise, and actionable\n- If the user adds new tasks: append, don't replace\n",
"input_schema": {
"type": "object",
"required": [
"tasks"
],
"properties": {
"tasks": {
"type": "array",
"description": "Array of tasks to write",
"items": {
"type": "object",
"required": [
"id",
"task",
"status"
],
"properties": {
"id": {
"type": "string",
"description": "stable, unique hyphenated slug"
},
"task": {
"type": "string",
"description": "actionable step in active tense, sentence case, plain text only, displayed to user"
},
"status": {
"type": "string",
"enum": [
"queued",
"in-progress",
"completed"
],
"description": "current task status"
}
}
}
}
}
}
},
{
"name": "set-slug",
"description": "Set a short slug as an identifier for this conversation.",
"input_schema": {
"type": "object",
"properties": {
"slug": {
"type": "string",
"description": "A 2-3 word alphanumeric hyphenated slug, imperative tense"
}
},
"required": [
"slug"
]
}
},
{
"name": "commit-message-style",
"description": "Provides git commit message style guidance. MANDATORY: You must use this tool before making any git commits.",
"input_schema": {
"type": "object",
"properties": {}
}
},
{
"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": {
"checked_guidance": {
"$ref": "#/definitions/checklistItem",
"description": "I checked for and followed any directory-specific guidance files for all modified files."
},
"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. A git hook will add Co-Authored-By and Change-ID trailers. 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 before presenting git commits to the user. Call if/when you've completed your current work and are ready for user feedback.",
"input_schema": {
"type": "object",
"properties": {}
}
},
{
"name": "about_sketch",
"description": "Provides information about Sketch.\n\nWhen to use this tool:\n\n- The user is asking how to USE Sketch itself (not asking Sketch to perform a task)\n- The user has questions about Sketch functionality, setup, or capabilities\n- The user needs help with Sketch-specific concepts like running commands, secrets management, git integration\n- The query is about \"How do I do X in Sketch?\" or \"Is it possible to Y in Sketch?\" or just \"Help\"\n- The user is confused about how a Sketch feature works or how to access it\n- You need to know how to interact with the host environment, e.g. port forwarding or pulling changes the user has made outside of Sketch\n",
"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"
},
"timeout": {
"type": "string",
"description": "Timeout as a Go duration string (default: 5s)"
}
},
"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"
},
"timeout": {
"type": "string",
"description": "Timeout as a Go duration string (default: 5s)"
}
},
"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"
},
"timeout": {
"type": "string",
"description": "Timeout as a Go duration string (default: 5s)"
}
},
"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": {
"type": "string",
"description": "Timeout as a Go duration string (default: 5s)"
}
},
"required": [
"selector"
]
}
},
{
"name": "browser_get_text",
"description": "Get the innerText of an element. Can be used to read the web page.",
"input_schema": {
"type": "object",
"properties": {
"selector": {
"type": "string",
"description": "CSS selector for the element to get text from"
},
"timeout": {
"type": "string",
"description": "Timeout as a Go duration string (default: 5s)"
}
},
"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"
},
"timeout": {
"type": "string",
"description": "Timeout as a Go duration string (default: 5s)"
}
},
"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"
},
"timeout": {
"type": "string",
"description": "Timeout as a Go duration string (default: 5s)"
}
},
"required": [
"selector"
]
}
},
{
"name": "browser_resize",
"description": "Resize the browser window to a specific width and height",
"input_schema": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"description": "Window width in pixels"
},
"height": {
"type": "integer",
"description": "Window height in pixels"
},
"timeout": {
"type": "string",
"description": "Timeout as a Go duration string (default: 5s)"
}
},
"required": [
"width",
"height"
]
}
},
{
"name": "browser_recent_console_logs",
"description": "Get recent browser console logs",
"input_schema": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"description": "Maximum number of log entries to return (default: 100)"
}
}
}
},
{
"name": "browser_clear_console_logs",
"description": "Clear all captured browser console logs",
"input_schema": {
"type": "object",
"properties": {}
}
},
{
"name": "browser_take_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"
]
},
"timeout": {
"type": "string",
"description": "Timeout as a Go duration string (default: 5s)"
}
}
}
},
{
"name": "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"
},
"timeout": {
"type": "string",
"description": "Timeout as a Go duration string (default: 5s)"
}
},
"required": [
"path"
]
}
}
],
"system": [
{
"text": "You are the expert software engineer and architect powering Sketch,\nan agentic coding environment that helps users accomplish coding tasks through autonomous analysis and implementation.\n\n\u003cworkflow\u003e\nStart by asking concise clarifying questions as needed.\nOnce the intent is clear, work autonomously.\nWhenever possible, do end-to-end testing, to ensure fully working functionality.\nAim for a small diff size while thoroughly completing the requested task.\nPrioritize thoughtful analysis and critical engagement over agreeability.\n\nCall the set-slug tool as soon as the topic of conversation is clear, often immediately.\n\nBreak down the overall goal into a series of smaller steps.\nUse the todo_read and todo_write tools to organize and track your work systematically.\n\nFollow 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- If you have completed a standalone chunk of work, make a git commit.\n- Update your todo task list.\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\nYou may run tool calls in parallel.\n\nComplete every task exhaustively - no matter how repetitive or tedious.\nPartial work, pattern demonstrations, or stubs with TODOs are not acceptable, unless explicitly permitted by the user.\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\n\n\nWhen communicating with the user, take it easy on the emoji, don't be over-enthusiastic, and be concise.\n\u003c/workflow\u003e\n\n\u003cstyle\u003e\nDefault coding guidelines:\n- Clear is better than clever.\n- Minimal inline comments: non-obvious logic and key decisions only.\n\u003c/style\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\nHEAD\n\u003c/HEAD\u003e\n\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-06-12T01:30:49Z
Anthropic-Ratelimit-Output-Tokens-Limit: 80000
Anthropic-Ratelimit-Output-Tokens-Remaining: 80000
Anthropic-Ratelimit-Output-Tokens-Reset: 2025-06-12T01:30:57Z
Anthropic-Ratelimit-Requests-Limit: 4000
Anthropic-Ratelimit-Requests-Remaining: 3999
Anthropic-Ratelimit-Requests-Reset: 2025-06-12T01:30:48Z
Anthropic-Ratelimit-Tokens-Limit: 280000
Anthropic-Ratelimit-Tokens-Remaining: 280000
Anthropic-Ratelimit-Tokens-Reset: 2025-06-12T01:30:49Z
Cf-Cache-Status: DYNAMIC
Cf-Ray: 94e595c2cf2615c2-SJC
Content-Type: application/json
Date: Thu, 12 Jun 2025 01:30:57 GMT
Request-Id: req_011CQ3TmsfarEWcq1a3S6vAH
Server: cloudflare
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Via: 1.1 google
X-Robots-Tag: none
{"id":"msg_012nUH4GVNxkfLo2t455oSoi","type":"message","role":"assistant","model":"claude-sonnet-4-20250514","content":[{"type":"text","text":"Here are the tools available to me:\n\n**File & Code Management:**\n- `bash` - Execute shell commands\n- `keyword_search` - Search for files/code with keywords\n- `patch` - Edit files with precise text operations\n- `codereview` - Run automated code review\n\n**Task Management:**\n- `todo_read` - Read current todo list\n- `todo_write` - Create/update task lists\n- `think` - Take notes and form plans\n\n**Git & Project:**\n- `commit-message-style` - Get git commit message guidance\n- `done` - Mark work complete with checklist verification\n- `set-slug` - Set conversation identifier\n\n**Browser Automation:**\n- `browser_navigate` - Navigate to URLs\n- `browser_click` - Click elements\n- `browser_type` - Type into inputs\n- `browser_wait_for` - Wait for elements\n- `browser_get_text` - Read page text\n- `browser_eval` - Execute JavaScript\n- `browser_scroll_into_view` - Scroll to elements\n- `browser_resize` - Resize browser window\n- `browser_take_screenshot` - Capture screenshots\n- `browser_recent_console_logs` - Get console logs\n- `browser_clear_console_logs` - Clear console logs\n\n**Utilities:**\n- `read_image` - Read and encode image files\n- `about_sketch` - Get help with Sketch functionality\n- `multiplechoice` - Present multiple choice questions"}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":3,"cache_creation_input_tokens":4670,"cache_read_input_tokens":0,"output_tokens":342,"service_tier":"standard"}}