Agent skill · AI & Agents

function-calling

LLM function calling and tool use patterns. Use when enabling LLMs to call external tools, defining tool schemas, implementing tool execution loops, or getting structured output from LLMs.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill function-calling --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 6 KB
Bundled scripts: none
Version: 1.0.0
Declared author: SkillForge
Path: skills/ai-llm/function-calling/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Function Calling Enable LLMs to use external tools and return structured data. ## When to Use - LLM needs to call APIs or databases - Extracting structured data from text - Building AI agents with tool use - Reliable JSON output from LLMs ## Basic Tool Definition (2026 Best Practice) ```python # OpenAI format with strict mode (2026 recommended) tools = [{ "type": "function", "function": { "name": "search_documents", "description": "Search the document database for relevant content", "strict": True, # ← 2026: Enables structured output validation "parameters": { "type": "object", "properties": { "query": { "type": "string", "description": "The search query" }, "limit": { "type": "integer", "description": "Max results to return" } }, "required": ["query", "limit"], # All props required when strict "additionalProperties": False # ← 2026: Required for strict mode } } }] # Note: With strict=True: # - All properties must be listed in "required" # - additionalProperties must be False # - No "default" values (provide via code instead) ``` ## Tool Execution Loop ```python async def run_with_tools(messages: list, tools: list) -> str: """Execute tool calls until LLM returns final answer."""

What's inside
Steps it walks through
  1. When to Use
  2. Basic Tool Definition (2026 Best Practice)
  3. Tool Execution Loop
  4. Structured Output (Guaranteed JSON)
  5. LangChain Tool Binding
  6. Parallel Tool Calls
  7. Key Decisions
  8. Common Mistakes
  9. Related Skills
  10. Capability Details
  11. tool-definition
  12. tool-execution-loop
  13. structured-output
  14. parallel-tool-calls
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the function-calling skill do?

LLM function calling and tool use patterns. Use when enabling LLMs to call external tools, defining tool schemas, implementing tool execution loops, or getting structured output from LLMs.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill function-calling --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going