| name | clade-embeddings-search |
| description | Implement tool use (function calling) with Claude to let it execute actions,
Use when working with embeddings-search patterns.
query databases, call APIs, and interact with external systems.
Trigger with "anthropic tool use", "claude function calling", "claude tools",
"anthropic structured output with tools".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Grep |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","anthropic","claude","tool-use","function-calling"] |
| compatibility | Designed for Claude Code |
Anthropic Tool Use (Function Calling)
Overview
Tool use lets Claude call functions you define — query databases, hit APIs, read files, do math. Claude decides when to call a tool, you execute it, and feed the result back. This is how you build Claude-powered agents.
Note: Anthropic does not offer an embeddings API. For embeddings + vector search, pair Claude with a dedicated embedding model (OpenAI, Cohere, or Voyage).
Prerequisites
- Completed
clade-model-inference
- Understanding of JSON Schema for tool definitions
Instructions
Step 1: Define Tools
import Anthropic from '@claude-ai/sdk';
const client = new Anthropic();
const tools: Anthropic.Tool[] = [
{
name: 'get_weather',
description: 'Get current weather for a city. Call this when the user asks about weather.',
input_schema: {
type: 'object',
properties: {
city: { type: 'string', description: 'City name, e.g. "San Francisco"' },
unit: { type: 'string', enum: ['celsius', 'fahrenheit'], description: 'Temperature unit' },
},
required: ['city'],
},
},
];
Step 2: Send Message with Tools
const response = client..({
: ,
: ,
tools,
: [{ : , : }],
});