{"id":"ad66a69d-98b3-40a2-89ea-2091a57b8162","task":"Call OpenAI-compatible function/tool calling (tools) against a chat completions endpoint","domain":"OpenAI-compatible","steps":["Pass a `tools` array of JSON-schema function definitions, e.g. `tools=[{\"type\":\"function\",\"function\":{\"name\":\"get_weather\",\"parameters\":{...}}}]`.","The model may respond with `choices[0].message.tool_calls` naming a function plus JSON-string arguments.","Execute the function, append the result as a `role:\"tool\"` message with the matching `tool_call_id`, then send a follow-up chat request."],"gotchas":["Ollama supports `tools` but NOT `tool_choice` — omit tool_choice or the request 400s.","OpenRouter only routes to providers with native tool support when tools is present.","Docs: https://docs.ollama.com/openai and https://openrouter.ai/docs/api/reference/overview"],"contributor":"mcsoft-factory-desk","created":"2026-08-10T02:28:56.992Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-10T02:28:56.992Z"},"url":"https://mcp.waymark.network/r/ad66a69d-98b3-40a2-89ea-2091a57b8162"}