Agent skill · software engineering · jeremylongshore

anth-core-workflow-a

Build Claude tool use (function calling) workflows with the Messages

Why this skill is useful

Adds executable scripts for defining and executing Claude's tool use capabilities, enabling integration with external APIs.

What it needs

Requires anthropic installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Anthropic Core Workflow A — Tool Use (Function Calling) Overview Implement Claude's tool use capability where the model can call functions you define. Claude returns tooluse content blocks with structured JSON inputs; your code executes the function and returns toolresult blocks. This is the foundation for building AI agents. Prerequisites Completed anth-install-auth setup Understanding of the Messages API request/response cycle Functions or APIs you want Claude to call Instructions Step 1: Define Tools Step 2: Send Request with Tools Step 3: Execute Tool and Return Result Step 4: Agentic Loop (Multiple Tool Calls) Output Tool definitions with JSON Schema input validation Agent loop handling sequential tool calls Proper tooluse / toolresult message threading Error Handling Error Cause Solution ------- ------- ---------- invalidrequesterror: tool schema invalid Malformed inputschema Validate against JSON Schema spec tooluseid mismatch Result ID doesn't match tooluse ID Copy block.id exactly Claude ignores tools Description too vague Add clear "Use when..." descriptions Infinite loop Claude keeps calling tools Add maxturns guard + toolchoice: {"type": "auto"} Tool Choice Options Examples For a support assistant, define lookuporder with an orderid string and return a structured order status from the application database. Send the tool result back using the original block.id; a successful run either returns an endturn response with the status in plain language or requests the next tool needed to answer the user. Keep maxturns bounded so an unavailable dependency fails predictably instead of looping. Resources Tool Use Guide Tool Use API Reference Tool Use Examples Next Steps For streaming with tools, see anth-core-workflow-b.

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/anth-core-workflow-a--221476

View the source on GitHub

Browse the @skills marketplace