anthropic-tools

Execute Anthropic Tool

Execute a tool_use block and return tool_result.

Accepts the tool_use block from a Claude response and returns the result ready to send back as a tool_result.

Example:

# After getting a tool_use from Claude
tool_use = next(
    block for block in response.content
    if block.type == "tool_use"
)

# Execute it
result = requests.post(
    "https://api.accurecord.io/tools/anthropic/execute",
    headers={"X-API-Key": "your_key"},
    json={
        "id": tool_use.id,
        "name": tool_use.name,
        "input": tool_use.input
    }
)

# Send back to Claude as tool_result
messages.append({
    "role": "user",
    "content": [result.json()]
})
post/tools/anthropic/execute

Request

  • Base URL: https://api.accurecord.io (the document declares no server; this is the origin it was published from)
  • URL: https://api.accurecord.io/tools/anthropic/execute
  • Auth: none declared

Headers

x-api-keystring nullable

Request body

idstring required

Tool use ID from Claude response

namestring required

Tool name

inputobject required

Tool input arguments

Response

Successful Response

object required

Changes

No recorded changes to this operation across all 1 revision of this API.