Implement function/tool calling with OpenRouter models. Use when building agents or structured outputs. Trigger with phrases like 'openrouter functions', 'openrouter tools', 'openrouter agent', 'function calling'.
From openrouter-packnpx claudepluginhub nickloveinvesting/nick-love-plugins --plugin openrouter-packThis skill is limited to using the following tools:
references/advanced-tool-definitions.mdreferences/basic-function-calling.mdreferences/errors.mdreferences/examples.mdreferences/forced-tool-use.mdreferences/model-compatibility.mdreferences/parallel-tool-calls.mdreferences/streaming-with-tools.mdreferences/tool-router.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
This skill demonstrates implementing function calling and tool use patterns with OpenRouter-supported models.
tools array with JSON Schema definitions for each function, specifying name, description, and parameter typestools array in your chat completion request; set tool_choice: "auto" to let the model decide when to call functionstool_calls from response.choices[0].message, deserialize each function.arguments JSON stringrole: "tool" messages containing the results| Error | Cause | Fix |
|---|---|---|
tool_calls is null | Model chose not to call tools or doesn't support them | Check model compatibility; use tool_choice: "required" to force |
| JSON parse error on arguments | Model generated malformed JSON | Wrap JSON.parse in try/catch; retry with a more capable model |
| 400 invalid tool schema | Schema has unsupported types or format | Use only JSON Schema draft-07 types; avoid $ref or complex constructs |
See ${CLAUDE_SKILL_DIR}/references/errors.md for full error reference.
See ${CLAUDE_SKILL_DIR}/references/examples.md for runnable code samples.