[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-launchdarkly-tools":3,"mdc-xynkxx-key":34,"related-org-launchdarkly-tools":2585,"related-repo-launchdarkly-tools":2718},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":20,"repoUrl":21,"updatedAt":22,"license":23,"forks":24,"topics":25,"repo":29,"sourceUrl":32,"mdContent":33},"tools","define and attach agent tools","Give your agents capabilities through tools (function calling). Helps you identify what your agent needs to do, create tool definitions, and attach them to config variations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"launchdarkly","LaunchDarkly","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Flaunchdarkly.png",[12,16,19],{"name":13,"slug":14,"type":15},"Agents","agents","tag",{"name":17,"slug":18,"type":15},"Engineering","engineering",{"name":9,"slug":8,"type":15},20,"https:\u002F\u002Fgithub.com\u002Flaunchdarkly\u002Fai-tooling","2026-05-22T06:55:26.692972","Apache-2.0",6,[26,27,28],"agent-skills","launchdarkly-ai","managed-by-terraform",{"repoUrl":21,"stars":20,"forks":24,"topics":30,"description":31},[26,27,28],"LaunchDarkly's official AI tooling","https:\u002F\u002Fgithub.com\u002Flaunchdarkly\u002Fai-tooling\u002Ftree\u002FHEAD\u002Fskills\u002Fagentcontrol\u002Ftools","---\nname: tools\ndescription: \"Give your agents capabilities through tools (function calling). Helps you identify what your agent needs to do, create tool definitions, and attach them to config variations.\"\nlicense: Apache-2.0\ncompatibility: Requires the remotely hosted LaunchDarkly MCP server\nmetadata:\n  author: launchdarkly\n  version: \"1.0.0-experimental\"\n---\n\n# Config Tools\n\nYou're using a skill that will guide you through adding capabilities to your agents through tools (function calling). Your job is to identify what your agent needs to do, create tool definitions, attach them to variations, and verify they work.\n\n## Prerequisites\n\nThis skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.\n\n**Required MCP tools:**\n- `create-ai-tool` -- create a new tool definition with a schema\n- `update-ai-config-variation` -- attach tools to a config variation\n- `get-ai-config` -- verify tools are attached to the variation\n\n**Optional MCP tools:**\n- `list-ai-tools` -- browse existing tools in the project\n- `get-ai-tool` -- inspect a specific tool's schema\n\n## Core Principles\n\n1. **Start with Capabilities**: Think about what your agent needs to do before creating tools\n2. **Framework Matters**: LangGraph\u002FCrewAI often auto-generate schemas; OpenAI SDK needs manual schemas\n3. **Create Before Attach**: Tools must exist before you can attach them to variations\n4. **Verify**: The agent fetches the config to confirm attachment\n5. **Complete the Full Workflow**: Listing existing tools is a discovery step, not the end goal. After listing, always proceed to create the requested tool, attach it, and verify. Do not stop after exploration.\n\n## Workflow\n\n### Step 1: Identify Needed Capabilities\n\nWhat should the agent be able to do?\n- Query databases, call APIs, perform calculations, send notifications\n- Check what exists in the codebase (API clients, functions)\n- Consider framework: LangGraph\u002FLangChain auto-generate schemas; direct SDK needs manual schemas\n\nIf the user asks to check existing tools first, or you have no codebase context about what tools exist, follow this exact order:\n1. `list-ai-tools` -- explore what exists\n2. `create-ai-tool` -- create the new tool (with a key different from existing ones)\n3. `update-ai-config-variation` -- attach it\n4. `get-ai-config` -- verify\n\nCall `list-ai-tools` as your **first** tool call before any creation. Never stop after listing alone -- always proceed through all four steps.\n\n### Step 2: Create Tools\n\nUse `create-ai-tool` with:\n- `key` -- unique identifier for the tool\n- `description` -- clear description (the LLM uses this to decide when to call the tool)\n- `schema` -- raw JSON Schema (do NOT use the OpenAI function calling wrapper):\n\n```json\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"query\": {\"type\": \"string\", \"description\": \"Search query\"},\n    \"limit\": {\"type\": \"integer\", \"default\": 10}\n  },\n  \"required\": [\"query\"]\n}\n```\n\n### Step 3: Attach to Variation\n\nUse `update-ai-config-variation` to attach tools. **Pass only the `tools` field.** Do not bundle `instructions`, `messages`, `model`, or `parameters` into this PATCH unless the user has explicitly asked you to also update those fields. Those fields may have been edited in the LaunchDarkly UI since the variation was created, and including them in a tool-attachment PATCH will silently clobber the UI edits.\n\n```json\n{\n  \"projectKey\": \"my-project\",\n  \"configKey\": \"support-chatbot\",\n  \"variationKey\": \"default\",\n  \"tools\": [\n    {\"key\": \"search-knowledge-base\", \"version\": 1}\n  ]\n}\n```\n\nIf you observe a UI-clear bug where attaching tools wipes other fields, **do not work around it by re-sending those fields from the previous `get-ai-config` response** — that masks the bug and can resurrect stale values that the user has since edited. Report the bug instead.\n\n### Step 4: Verify\n\n1. Use `get-ai-tool` to confirm the tool exists with a valid schema\n2. Use `get-ai-config` to confirm the tool is attached to the variation (check `tools` in the variation's output)\n\n**Report results:**\n- Tool created with valid schema\n- Tool attached to variation\n- Flag any issues\n\n## Per-provider schema at the call site\n\nLaunchDarkly stores the tool schema once — the flat `{type, name, description, parameters}` shape you passed to `create-ai-tool`. Your application reads it back via `config.model.parameters.tools` (completion mode) or `agent_config.model.parameters.tools` (agent mode), then converts to the shape the provider SDK expects. LaunchDarkly never makes the provider call; your code does. The handlers that implement each tool also stay in application code — LaunchDarkly stores the schema, your application owns the behavior.\n\n| Provider \u002F framework | Target shape | Where it goes on the call |\n|---|---|---|\n| OpenAI Chat Completions (direct SDK) | `{type: \"function\", function: {name, description, parameters}}` | top-level `tools=[...]` |\n| Anthropic direct SDK | `{name, description, input_schema}` — rename `parameters` → `input_schema` | top-level `tools=[...]` |\n| Bedrock Converse | `{toolSpec: {name, description, inputSchema: {json: parameters}}}` | inside `toolConfig.tools=[...]` |\n| Gemini (`google-genai`) | `{function_declarations: [{name, description, parameters}]}` (Python) \u002F `{functionDeclarations: [...]}` (Node) | `GenerateContentConfig.tools=[...]` |\n| OpenAI Responses API | LaunchDarkly's flat shape passes through unchanged | top-level `tools=[...]` |\n| LangChain \u002F LangGraph | `createLangChainModel(config)` (Node) \u002F `create_langchain_model(config)` (Python) and pass `ai_config.tools` (or your own `StructuredTool` list) into `bind_tools(...)` \u002F `create_react_agent(tools=[...])` | framework-native; no per-call conversion |\n| Strands Agents | LaunchDarkly's flat shape; drop `parameters.tools` before passing params to the Strands model class (`AnthropicModel`, `OpenAIModel`) — Python `@tool`-decorated callables stay in code | `Agent(tools=[...])` constructor; no per-call conversion |\n\nMinimal conversion snippets (Python):\n\n```python\nld_tools = (ai_config.model.to_dict().get(\"parameters\") or {}).get(\"tools\", []) or []\n\n# OpenAI Chat Completions\nopenai_tools = [\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": t[\"name\"],\n            \"description\": t.get(\"description\", \"\"),\n            \"parameters\": t.get(\"parameters\", {\"type\": \"object\", \"properties\": {}}),\n        },\n    }\n    for t in ld_tools\n]\n\n# Anthropic\nanthropic_tools = [\n    {\n        \"name\": t[\"name\"],\n        \"description\": t.get(\"description\", \"\"),\n        \"input_schema\": t.get(\"parameters\", {\"type\": \"object\", \"properties\": {}}),\n    }\n    for t in ld_tools\n]\n\n# Bedrock Converse\nbedrock_tool_config = {\n    \"tools\": [\n        {\n            \"toolSpec\": {\n                \"name\": t[\"name\"],\n                \"description\": t.get(\"description\", \"\"),\n                \"inputSchema\": {\"json\": t.get(\"parameters\", {\"type\": \"object\", \"properties\": {}})},\n            }\n        }\n        for t in ld_tools\n    ]\n}\n\n# Gemini\ngemini_tools = [\n    {\n        \"function_declarations\": [\n            {\n                \"name\": t[\"name\"],\n                \"description\": t.get(\"description\", \"\"),\n                \"parameters\": t.get(\"parameters\", {\"type\": \"object\", \"properties\": {}}),\n            }\n            for t in ld_tools\n        ]\n    }\n] if ld_tools else []\n```\n\n## Agent loop with tool calls\n\nAn agent that uses tools runs a short loop: call the provider, dispatch any tool calls, loop again, stop when the provider returns a final answer. Three rules apply regardless of provider:\n\n1. **Bound the loop.** `MAX_STEPS = 5` is a safe default. A runaway tool loop is almost always a prompt or schema bug, not a case that needs 50 iterations.\n2. **Track every tool invocation.** Call `tracker.track_tool_call(tool_name)` \u002F `tracker.trackToolCall(toolName)` for each tool the agent actually executes. This is what the Monitoring tab counts as tool usage.\n3. **Break on the provider's \"no more tool calls\" signal.** The exact signal differs per provider: OpenAI Chat Completions → `choice.finish_reason != \"tool_calls\"`; Anthropic → `response.stop_reason != \"tool_use\"`; Bedrock Converse → `response[\"stopReason\"] != \"tool_use\"`; Gemini → `response.function_calls` empty; OpenAI Responses API → no `function_call` items in `response.output`.\n\nSkeleton (Python, Anthropic — the other providers follow the same shape with their own stop-reason check and tool-result formatting):\n\n```python\nmessages = [{\"role\": \"user\", \"content\": initial_input}]\nMAX_STEPS = 5\nfor _ in range(MAX_STEPS):\n    response = tracker.track_metrics_of(\n        anthropic_metrics,\n        lambda: anthropic_client.messages.create(\n            model=agent.model.name,\n            system=agent.instructions,\n            messages=messages,\n            tools=anthropic_tools,\n            **params,\n        ),\n    )\n    if response.stop_reason != \"tool_use\":\n        break\n\n    messages.append({\"role\": \"assistant\", \"content\": response.content})\n\n    tool_results = []\n    for block in response.content:\n        if block.type != \"tool_use\":\n            continue\n        if block.name not in tool_handlers:\n            raise ValueError(f\"Unknown tool: {block.name}\")\n        result = tool_handlers[block.name](**block.input)\n        tracker.track_tool_call(block.name)\n        tool_results.append({\n            \"type\": \"tool_result\",\n            \"tool_use_id\": block.id,\n            \"content\": result,\n        })\n    messages.append({\"role\": \"user\", \"content\": tool_results})\n```\n\nPer-provider tool-call payload shapes live in the `built-in-metrics` references:\n\n- [openai-tracking.md](..\u002Fbuilt-in-metrics\u002Freferences\u002Fopenai-tracking.md) — Chat Completions + Responses API\n- [anthropic-tracking.md](..\u002Fbuilt-in-metrics\u002Freferences\u002Fanthropic-tracking.md) — `tool_use` blocks and `tool_result` payloads\n- [bedrock-tracking.md](..\u002Fbuilt-in-metrics\u002Freferences\u002Fbedrock-tracking.md) — `toolUse` \u002F `toolResult` Converse format\n- [gemini-tracking.md](..\u002Fbuilt-in-metrics\u002Freferences\u002Fgemini-tracking.md) — `functionCalls` \u002F `functionResponse` parts\n- [langchain-tracking.md](..\u002Fbuilt-in-metrics\u002Freferences\u002Flangchain-tracking.md) — LangGraph tool loop inherits from `create_react_agent`\n\n## Orchestrator Note\n\nLangGraph, CrewAI, and AutoGen often generate schemas from function definitions. You still need to create tools in LaunchDarkly and attach keys to variations so the SDK knows what's available.\n\n## Edge Cases\n\n| Situation | Action |\n|-----------|--------|\n| Tool already exists (409) | Use existing or create with different key |\n| Schema invalid | Use raw JSON Schema format (type: object, properties, required) |\n| Wrong endpoint assumed | The tools use `\u002Fai-tools`, not `\u002Fai-configs\u002Ftools` |\n\n## What NOT to Do\n\n- Don't try to attach tools during config creation -- update the variation afterward\n- Don't skip clear tool descriptions (LLM needs them to decide when to call)\n- Don't forget to verify attachment after updating the variation\n- Don't bundle `instructions`, `messages`, `model`, or `parameters` into the tool-attachment PATCH. Send `tools` alone unless the user explicitly asked for a multi-field update — bundled PATCHes silently clobber UI edits to the other fields.\n\n## Related Skills\n\n- `configs-create` -- Create config before attaching tools\n- `configs-variations` -- Manage variations with different tool sets\n",{"data":35,"body":39},{"name":4,"description":6,"license":23,"compatibility":36,"metadata":37},"Requires the remotely hosted LaunchDarkly MCP server",{"author":8,"version":38},"1.0.0-experimental",{"type":40,"children":41},"root",[42,51,57,64,69,78,117,125,150,156,210,216,223,228,246,251,294,313,319,331,367,702,708,764,994,1013,1019,1051,1059,1077,1083,1119,1432,1437,1892,1898,1903,2007,2012,2273,2286,2395,2401,2406,2412,2487,2493,2548,2554,2579],{"type":43,"tag":44,"props":45,"children":47},"element","h1",{"id":46},"config-tools",[48],{"type":49,"value":50},"text","Config Tools",{"type":43,"tag":52,"props":53,"children":54},"p",{},[55],{"type":49,"value":56},"You're using a skill that will guide you through adding capabilities to your agents through tools (function calling). Your job is to identify what your agent needs to do, create tool definitions, attach them to variations, and verify they work.",{"type":43,"tag":58,"props":59,"children":61},"h2",{"id":60},"prerequisites",[62],{"type":49,"value":63},"Prerequisites",{"type":43,"tag":52,"props":65,"children":66},{},[67],{"type":49,"value":68},"This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.",{"type":43,"tag":52,"props":70,"children":71},{},[72],{"type":43,"tag":73,"props":74,"children":75},"strong",{},[76],{"type":49,"value":77},"Required MCP tools:",{"type":43,"tag":79,"props":80,"children":81},"ul",{},[82,95,106],{"type":43,"tag":83,"props":84,"children":85},"li",{},[86,93],{"type":43,"tag":87,"props":88,"children":90},"code",{"className":89},[],[91],{"type":49,"value":92},"create-ai-tool",{"type":49,"value":94}," -- create a new tool definition with a schema",{"type":43,"tag":83,"props":96,"children":97},{},[98,104],{"type":43,"tag":87,"props":99,"children":101},{"className":100},[],[102],{"type":49,"value":103},"update-ai-config-variation",{"type":49,"value":105}," -- attach tools to a config variation",{"type":43,"tag":83,"props":107,"children":108},{},[109,115],{"type":43,"tag":87,"props":110,"children":112},{"className":111},[],[113],{"type":49,"value":114},"get-ai-config",{"type":49,"value":116}," -- verify tools are attached to the variation",{"type":43,"tag":52,"props":118,"children":119},{},[120],{"type":43,"tag":73,"props":121,"children":122},{},[123],{"type":49,"value":124},"Optional MCP tools:",{"type":43,"tag":79,"props":126,"children":127},{},[128,139],{"type":43,"tag":83,"props":129,"children":130},{},[131,137],{"type":43,"tag":87,"props":132,"children":134},{"className":133},[],[135],{"type":49,"value":136},"list-ai-tools",{"type":49,"value":138}," -- browse existing tools in the project",{"type":43,"tag":83,"props":140,"children":141},{},[142,148],{"type":43,"tag":87,"props":143,"children":145},{"className":144},[],[146],{"type":49,"value":147},"get-ai-tool",{"type":49,"value":149}," -- inspect a specific tool's schema",{"type":43,"tag":58,"props":151,"children":153},{"id":152},"core-principles",[154],{"type":49,"value":155},"Core Principles",{"type":43,"tag":157,"props":158,"children":159},"ol",{},[160,170,180,190,200],{"type":43,"tag":83,"props":161,"children":162},{},[163,168],{"type":43,"tag":73,"props":164,"children":165},{},[166],{"type":49,"value":167},"Start with Capabilities",{"type":49,"value":169},": Think about what your agent needs to do before creating tools",{"type":43,"tag":83,"props":171,"children":172},{},[173,178],{"type":43,"tag":73,"props":174,"children":175},{},[176],{"type":49,"value":177},"Framework Matters",{"type":49,"value":179},": LangGraph\u002FCrewAI often auto-generate schemas; OpenAI SDK needs manual schemas",{"type":43,"tag":83,"props":181,"children":182},{},[183,188],{"type":43,"tag":73,"props":184,"children":185},{},[186],{"type":49,"value":187},"Create Before Attach",{"type":49,"value":189},": Tools must exist before you can attach them to variations",{"type":43,"tag":83,"props":191,"children":192},{},[193,198],{"type":43,"tag":73,"props":194,"children":195},{},[196],{"type":49,"value":197},"Verify",{"type":49,"value":199},": The agent fetches the config to confirm attachment",{"type":43,"tag":83,"props":201,"children":202},{},[203,208],{"type":43,"tag":73,"props":204,"children":205},{},[206],{"type":49,"value":207},"Complete the Full Workflow",{"type":49,"value":209},": Listing existing tools is a discovery step, not the end goal. After listing, always proceed to create the requested tool, attach it, and verify. Do not stop after exploration.",{"type":43,"tag":58,"props":211,"children":213},{"id":212},"workflow",[214],{"type":49,"value":215},"Workflow",{"type":43,"tag":217,"props":218,"children":220},"h3",{"id":219},"step-1-identify-needed-capabilities",[221],{"type":49,"value":222},"Step 1: Identify Needed Capabilities",{"type":43,"tag":52,"props":224,"children":225},{},[226],{"type":49,"value":227},"What should the agent be able to do?",{"type":43,"tag":79,"props":229,"children":230},{},[231,236,241],{"type":43,"tag":83,"props":232,"children":233},{},[234],{"type":49,"value":235},"Query databases, call APIs, perform calculations, send notifications",{"type":43,"tag":83,"props":237,"children":238},{},[239],{"type":49,"value":240},"Check what exists in the codebase (API clients, functions)",{"type":43,"tag":83,"props":242,"children":243},{},[244],{"type":49,"value":245},"Consider framework: LangGraph\u002FLangChain auto-generate schemas; direct SDK needs manual schemas",{"type":43,"tag":52,"props":247,"children":248},{},[249],{"type":49,"value":250},"If the user asks to check existing tools first, or you have no codebase context about what tools exist, follow this exact order:",{"type":43,"tag":157,"props":252,"children":253},{},[254,264,274,284],{"type":43,"tag":83,"props":255,"children":256},{},[257,262],{"type":43,"tag":87,"props":258,"children":260},{"className":259},[],[261],{"type":49,"value":136},{"type":49,"value":263}," -- explore what exists",{"type":43,"tag":83,"props":265,"children":266},{},[267,272],{"type":43,"tag":87,"props":268,"children":270},{"className":269},[],[271],{"type":49,"value":92},{"type":49,"value":273}," -- create the new tool (with a key different from existing ones)",{"type":43,"tag":83,"props":275,"children":276},{},[277,282],{"type":43,"tag":87,"props":278,"children":280},{"className":279},[],[281],{"type":49,"value":103},{"type":49,"value":283}," -- attach it",{"type":43,"tag":83,"props":285,"children":286},{},[287,292],{"type":43,"tag":87,"props":288,"children":290},{"className":289},[],[291],{"type":49,"value":114},{"type":49,"value":293}," -- verify",{"type":43,"tag":52,"props":295,"children":296},{},[297,299,304,306,311],{"type":49,"value":298},"Call ",{"type":43,"tag":87,"props":300,"children":302},{"className":301},[],[303],{"type":49,"value":136},{"type":49,"value":305}," as your ",{"type":43,"tag":73,"props":307,"children":308},{},[309],{"type":49,"value":310},"first",{"type":49,"value":312}," tool call before any creation. Never stop after listing alone -- always proceed through all four steps.",{"type":43,"tag":217,"props":314,"children":316},{"id":315},"step-2-create-tools",[317],{"type":49,"value":318},"Step 2: Create Tools",{"type":43,"tag":52,"props":320,"children":321},{},[322,324,329],{"type":49,"value":323},"Use ",{"type":43,"tag":87,"props":325,"children":327},{"className":326},[],[328],{"type":49,"value":92},{"type":49,"value":330}," with:",{"type":43,"tag":79,"props":332,"children":333},{},[334,345,356],{"type":43,"tag":83,"props":335,"children":336},{},[337,343],{"type":43,"tag":87,"props":338,"children":340},{"className":339},[],[341],{"type":49,"value":342},"key",{"type":49,"value":344}," -- unique identifier for the tool",{"type":43,"tag":83,"props":346,"children":347},{},[348,354],{"type":43,"tag":87,"props":349,"children":351},{"className":350},[],[352],{"type":49,"value":353},"description",{"type":49,"value":355}," -- clear description (the LLM uses this to decide when to call the tool)",{"type":43,"tag":83,"props":357,"children":358},{},[359,365],{"type":43,"tag":87,"props":360,"children":362},{"className":361},[],[363],{"type":49,"value":364},"schema",{"type":49,"value":366}," -- raw JSON Schema (do NOT use the OpenAI function calling wrapper):",{"type":43,"tag":368,"props":369,"children":374},"pre",{"className":370,"code":371,"language":372,"meta":373,"style":373},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"type\": \"object\",\n  \"properties\": {\n    \"query\": {\"type\": \"string\", \"description\": \"Search query\"},\n    \"limit\": {\"type\": \"integer\", \"default\": 10}\n  },\n  \"required\": [\"query\"]\n}\n","json","",[375],{"type":43,"tag":87,"props":376,"children":377},{"__ignoreMap":373},[378,390,435,461,558,643,651,694],{"type":43,"tag":379,"props":380,"children":383},"span",{"class":381,"line":382},"line",1,[384],{"type":43,"tag":379,"props":385,"children":387},{"style":386},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[388],{"type":49,"value":389},"{\n",{"type":43,"tag":379,"props":391,"children":393},{"class":381,"line":392},2,[394,399,405,410,415,420,426,430],{"type":43,"tag":379,"props":395,"children":396},{"style":386},[397],{"type":49,"value":398},"  \"",{"type":43,"tag":379,"props":400,"children":402},{"style":401},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[403],{"type":49,"value":404},"type",{"type":43,"tag":379,"props":406,"children":407},{"style":386},[408],{"type":49,"value":409},"\"",{"type":43,"tag":379,"props":411,"children":412},{"style":386},[413],{"type":49,"value":414},":",{"type":43,"tag":379,"props":416,"children":417},{"style":386},[418],{"type":49,"value":419}," \"",{"type":43,"tag":379,"props":421,"children":423},{"style":422},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[424],{"type":49,"value":425},"object",{"type":43,"tag":379,"props":427,"children":428},{"style":386},[429],{"type":49,"value":409},{"type":43,"tag":379,"props":431,"children":432},{"style":386},[433],{"type":49,"value":434},",\n",{"type":43,"tag":379,"props":436,"children":438},{"class":381,"line":437},3,[439,443,448,452,456],{"type":43,"tag":379,"props":440,"children":441},{"style":386},[442],{"type":49,"value":398},{"type":43,"tag":379,"props":444,"children":445},{"style":401},[446],{"type":49,"value":447},"properties",{"type":43,"tag":379,"props":449,"children":450},{"style":386},[451],{"type":49,"value":409},{"type":43,"tag":379,"props":453,"children":454},{"style":386},[455],{"type":49,"value":414},{"type":43,"tag":379,"props":457,"children":458},{"style":386},[459],{"type":49,"value":460}," {\n",{"type":43,"tag":379,"props":462,"children":464},{"class":381,"line":463},4,[465,470,476,480,484,489,493,498,502,506,510,515,519,524,528,532,536,540,544,549,553],{"type":43,"tag":379,"props":466,"children":467},{"style":386},[468],{"type":49,"value":469},"    \"",{"type":43,"tag":379,"props":471,"children":473},{"style":472},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[474],{"type":49,"value":475},"query",{"type":43,"tag":379,"props":477,"children":478},{"style":386},[479],{"type":49,"value":409},{"type":43,"tag":379,"props":481,"children":482},{"style":386},[483],{"type":49,"value":414},{"type":43,"tag":379,"props":485,"children":486},{"style":386},[487],{"type":49,"value":488}," {",{"type":43,"tag":379,"props":490,"children":491},{"style":386},[492],{"type":49,"value":409},{"type":43,"tag":379,"props":494,"children":496},{"style":495},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[497],{"type":49,"value":404},{"type":43,"tag":379,"props":499,"children":500},{"style":386},[501],{"type":49,"value":409},{"type":43,"tag":379,"props":503,"children":504},{"style":386},[505],{"type":49,"value":414},{"type":43,"tag":379,"props":507,"children":508},{"style":386},[509],{"type":49,"value":419},{"type":43,"tag":379,"props":511,"children":512},{"style":422},[513],{"type":49,"value":514},"string",{"type":43,"tag":379,"props":516,"children":517},{"style":386},[518],{"type":49,"value":409},{"type":43,"tag":379,"props":520,"children":521},{"style":386},[522],{"type":49,"value":523},",",{"type":43,"tag":379,"props":525,"children":526},{"style":386},[527],{"type":49,"value":419},{"type":43,"tag":379,"props":529,"children":530},{"style":495},[531],{"type":49,"value":353},{"type":43,"tag":379,"props":533,"children":534},{"style":386},[535],{"type":49,"value":409},{"type":43,"tag":379,"props":537,"children":538},{"style":386},[539],{"type":49,"value":414},{"type":43,"tag":379,"props":541,"children":542},{"style":386},[543],{"type":49,"value":419},{"type":43,"tag":379,"props":545,"children":546},{"style":422},[547],{"type":49,"value":548},"Search query",{"type":43,"tag":379,"props":550,"children":551},{"style":386},[552],{"type":49,"value":409},{"type":43,"tag":379,"props":554,"children":555},{"style":386},[556],{"type":49,"value":557},"},\n",{"type":43,"tag":379,"props":559,"children":561},{"class":381,"line":560},5,[562,566,571,575,579,583,587,591,595,599,603,608,612,616,620,625,629,633,638],{"type":43,"tag":379,"props":563,"children":564},{"style":386},[565],{"type":49,"value":469},{"type":43,"tag":379,"props":567,"children":568},{"style":472},[569],{"type":49,"value":570},"limit",{"type":43,"tag":379,"props":572,"children":573},{"style":386},[574],{"type":49,"value":409},{"type":43,"tag":379,"props":576,"children":577},{"style":386},[578],{"type":49,"value":414},{"type":43,"tag":379,"props":580,"children":581},{"style":386},[582],{"type":49,"value":488},{"type":43,"tag":379,"props":584,"children":585},{"style":386},[586],{"type":49,"value":409},{"type":43,"tag":379,"props":588,"children":589},{"style":495},[590],{"type":49,"value":404},{"type":43,"tag":379,"props":592,"children":593},{"style":386},[594],{"type":49,"value":409},{"type":43,"tag":379,"props":596,"children":597},{"style":386},[598],{"type":49,"value":414},{"type":43,"tag":379,"props":600,"children":601},{"style":386},[602],{"type":49,"value":419},{"type":43,"tag":379,"props":604,"children":605},{"style":422},[606],{"type":49,"value":607},"integer",{"type":43,"tag":379,"props":609,"children":610},{"style":386},[611],{"type":49,"value":409},{"type":43,"tag":379,"props":613,"children":614},{"style":386},[615],{"type":49,"value":523},{"type":43,"tag":379,"props":617,"children":618},{"style":386},[619],{"type":49,"value":419},{"type":43,"tag":379,"props":621,"children":622},{"style":495},[623],{"type":49,"value":624},"default",{"type":43,"tag":379,"props":626,"children":627},{"style":386},[628],{"type":49,"value":409},{"type":43,"tag":379,"props":630,"children":631},{"style":386},[632],{"type":49,"value":414},{"type":43,"tag":379,"props":634,"children":635},{"style":495},[636],{"type":49,"value":637}," 10",{"type":43,"tag":379,"props":639,"children":640},{"style":386},[641],{"type":49,"value":642},"}\n",{"type":43,"tag":379,"props":644,"children":645},{"class":381,"line":24},[646],{"type":43,"tag":379,"props":647,"children":648},{"style":386},[649],{"type":49,"value":650},"  },\n",{"type":43,"tag":379,"props":652,"children":654},{"class":381,"line":653},7,[655,659,664,668,672,677,681,685,689],{"type":43,"tag":379,"props":656,"children":657},{"style":386},[658],{"type":49,"value":398},{"type":43,"tag":379,"props":660,"children":661},{"style":401},[662],{"type":49,"value":663},"required",{"type":43,"tag":379,"props":665,"children":666},{"style":386},[667],{"type":49,"value":409},{"type":43,"tag":379,"props":669,"children":670},{"style":386},[671],{"type":49,"value":414},{"type":43,"tag":379,"props":673,"children":674},{"style":386},[675],{"type":49,"value":676}," [",{"type":43,"tag":379,"props":678,"children":679},{"style":386},[680],{"type":49,"value":409},{"type":43,"tag":379,"props":682,"children":683},{"style":422},[684],{"type":49,"value":475},{"type":43,"tag":379,"props":686,"children":687},{"style":386},[688],{"type":49,"value":409},{"type":43,"tag":379,"props":690,"children":691},{"style":386},[692],{"type":49,"value":693},"]\n",{"type":43,"tag":379,"props":695,"children":697},{"class":381,"line":696},8,[698],{"type":43,"tag":379,"props":699,"children":700},{"style":386},[701],{"type":49,"value":642},{"type":43,"tag":217,"props":703,"children":705},{"id":704},"step-3-attach-to-variation",[706],{"type":49,"value":707},"Step 3: Attach to Variation",{"type":43,"tag":52,"props":709,"children":710},{},[711,712,717,719,731,733,739,741,747,748,754,756,762],{"type":49,"value":323},{"type":43,"tag":87,"props":713,"children":715},{"className":714},[],[716],{"type":49,"value":103},{"type":49,"value":718}," to attach tools. ",{"type":43,"tag":73,"props":720,"children":721},{},[722,724,729],{"type":49,"value":723},"Pass only the ",{"type":43,"tag":87,"props":725,"children":727},{"className":726},[],[728],{"type":49,"value":4},{"type":49,"value":730}," field.",{"type":49,"value":732}," Do not bundle ",{"type":43,"tag":87,"props":734,"children":736},{"className":735},[],[737],{"type":49,"value":738},"instructions",{"type":49,"value":740},", ",{"type":43,"tag":87,"props":742,"children":744},{"className":743},[],[745],{"type":49,"value":746},"messages",{"type":49,"value":740},{"type":43,"tag":87,"props":749,"children":751},{"className":750},[],[752],{"type":49,"value":753},"model",{"type":49,"value":755},", or ",{"type":43,"tag":87,"props":757,"children":759},{"className":758},[],[760],{"type":49,"value":761},"parameters",{"type":49,"value":763}," into this PATCH unless the user has explicitly asked you to also update those fields. Those fields may have been edited in the LaunchDarkly UI since the variation was created, and including them in a tool-attachment PATCH will silently clobber the UI edits.",{"type":43,"tag":368,"props":765,"children":767},{"className":370,"code":766,"language":372,"meta":373,"style":373},"{\n  \"projectKey\": \"my-project\",\n  \"configKey\": \"support-chatbot\",\n  \"variationKey\": \"default\",\n  \"tools\": [\n    {\"key\": \"search-knowledge-base\", \"version\": 1}\n  ]\n}\n",[768],{"type":43,"tag":87,"props":769,"children":770},{"__ignoreMap":373},[771,778,815,852,888,912,979,987],{"type":43,"tag":379,"props":772,"children":773},{"class":381,"line":382},[774],{"type":43,"tag":379,"props":775,"children":776},{"style":386},[777],{"type":49,"value":389},{"type":43,"tag":379,"props":779,"children":780},{"class":381,"line":392},[781,785,790,794,798,802,807,811],{"type":43,"tag":379,"props":782,"children":783},{"style":386},[784],{"type":49,"value":398},{"type":43,"tag":379,"props":786,"children":787},{"style":401},[788],{"type":49,"value":789},"projectKey",{"type":43,"tag":379,"props":791,"children":792},{"style":386},[793],{"type":49,"value":409},{"type":43,"tag":379,"props":795,"children":796},{"style":386},[797],{"type":49,"value":414},{"type":43,"tag":379,"props":799,"children":800},{"style":386},[801],{"type":49,"value":419},{"type":43,"tag":379,"props":803,"children":804},{"style":422},[805],{"type":49,"value":806},"my-project",{"type":43,"tag":379,"props":808,"children":809},{"style":386},[810],{"type":49,"value":409},{"type":43,"tag":379,"props":812,"children":813},{"style":386},[814],{"type":49,"value":434},{"type":43,"tag":379,"props":816,"children":817},{"class":381,"line":437},[818,822,827,831,835,839,844,848],{"type":43,"tag":379,"props":819,"children":820},{"style":386},[821],{"type":49,"value":398},{"type":43,"tag":379,"props":823,"children":824},{"style":401},[825],{"type":49,"value":826},"configKey",{"type":43,"tag":379,"props":828,"children":829},{"style":386},[830],{"type":49,"value":409},{"type":43,"tag":379,"props":832,"children":833},{"style":386},[834],{"type":49,"value":414},{"type":43,"tag":379,"props":836,"children":837},{"style":386},[838],{"type":49,"value":419},{"type":43,"tag":379,"props":840,"children":841},{"style":422},[842],{"type":49,"value":843},"support-chatbot",{"type":43,"tag":379,"props":845,"children":846},{"style":386},[847],{"type":49,"value":409},{"type":43,"tag":379,"props":849,"children":850},{"style":386},[851],{"type":49,"value":434},{"type":43,"tag":379,"props":853,"children":854},{"class":381,"line":463},[855,859,864,868,872,876,880,884],{"type":43,"tag":379,"props":856,"children":857},{"style":386},[858],{"type":49,"value":398},{"type":43,"tag":379,"props":860,"children":861},{"style":401},[862],{"type":49,"value":863},"variationKey",{"type":43,"tag":379,"props":865,"children":866},{"style":386},[867],{"type":49,"value":409},{"type":43,"tag":379,"props":869,"children":870},{"style":386},[871],{"type":49,"value":414},{"type":43,"tag":379,"props":873,"children":874},{"style":386},[875],{"type":49,"value":419},{"type":43,"tag":379,"props":877,"children":878},{"style":422},[879],{"type":49,"value":624},{"type":43,"tag":379,"props":881,"children":882},{"style":386},[883],{"type":49,"value":409},{"type":43,"tag":379,"props":885,"children":886},{"style":386},[887],{"type":49,"value":434},{"type":43,"tag":379,"props":889,"children":890},{"class":381,"line":560},[891,895,899,903,907],{"type":43,"tag":379,"props":892,"children":893},{"style":386},[894],{"type":49,"value":398},{"type":43,"tag":379,"props":896,"children":897},{"style":401},[898],{"type":49,"value":4},{"type":43,"tag":379,"props":900,"children":901},{"style":386},[902],{"type":49,"value":409},{"type":43,"tag":379,"props":904,"children":905},{"style":386},[906],{"type":49,"value":414},{"type":43,"tag":379,"props":908,"children":909},{"style":386},[910],{"type":49,"value":911}," [\n",{"type":43,"tag":379,"props":913,"children":914},{"class":381,"line":24},[915,920,924,928,932,936,940,945,949,953,957,962,966,970,975],{"type":43,"tag":379,"props":916,"children":917},{"style":386},[918],{"type":49,"value":919},"    {",{"type":43,"tag":379,"props":921,"children":922},{"style":386},[923],{"type":49,"value":409},{"type":43,"tag":379,"props":925,"children":926},{"style":472},[927],{"type":49,"value":342},{"type":43,"tag":379,"props":929,"children":930},{"style":386},[931],{"type":49,"value":409},{"type":43,"tag":379,"props":933,"children":934},{"style":386},[935],{"type":49,"value":414},{"type":43,"tag":379,"props":937,"children":938},{"style":386},[939],{"type":49,"value":419},{"type":43,"tag":379,"props":941,"children":942},{"style":422},[943],{"type":49,"value":944},"search-knowledge-base",{"type":43,"tag":379,"props":946,"children":947},{"style":386},[948],{"type":49,"value":409},{"type":43,"tag":379,"props":950,"children":951},{"style":386},[952],{"type":49,"value":523},{"type":43,"tag":379,"props":954,"children":955},{"style":386},[956],{"type":49,"value":419},{"type":43,"tag":379,"props":958,"children":959},{"style":472},[960],{"type":49,"value":961},"version",{"type":43,"tag":379,"props":963,"children":964},{"style":386},[965],{"type":49,"value":409},{"type":43,"tag":379,"props":967,"children":968},{"style":386},[969],{"type":49,"value":414},{"type":43,"tag":379,"props":971,"children":972},{"style":495},[973],{"type":49,"value":974}," 1",{"type":43,"tag":379,"props":976,"children":977},{"style":386},[978],{"type":49,"value":642},{"type":43,"tag":379,"props":980,"children":981},{"class":381,"line":653},[982],{"type":43,"tag":379,"props":983,"children":984},{"style":386},[985],{"type":49,"value":986},"  ]\n",{"type":43,"tag":379,"props":988,"children":989},{"class":381,"line":696},[990],{"type":43,"tag":379,"props":991,"children":992},{"style":386},[993],{"type":49,"value":642},{"type":43,"tag":52,"props":995,"children":996},{},[997,999,1011],{"type":49,"value":998},"If you observe a UI-clear bug where attaching tools wipes other fields, ",{"type":43,"tag":73,"props":1000,"children":1001},{},[1002,1004,1009],{"type":49,"value":1003},"do not work around it by re-sending those fields from the previous ",{"type":43,"tag":87,"props":1005,"children":1007},{"className":1006},[],[1008],{"type":49,"value":114},{"type":49,"value":1010}," response",{"type":49,"value":1012}," — that masks the bug and can resurrect stale values that the user has since edited. Report the bug instead.",{"type":43,"tag":217,"props":1014,"children":1016},{"id":1015},"step-4-verify",[1017],{"type":49,"value":1018},"Step 4: Verify",{"type":43,"tag":157,"props":1020,"children":1021},{},[1022,1033],{"type":43,"tag":83,"props":1023,"children":1024},{},[1025,1026,1031],{"type":49,"value":323},{"type":43,"tag":87,"props":1027,"children":1029},{"className":1028},[],[1030],{"type":49,"value":147},{"type":49,"value":1032}," to confirm the tool exists with a valid schema",{"type":43,"tag":83,"props":1034,"children":1035},{},[1036,1037,1042,1044,1049],{"type":49,"value":323},{"type":43,"tag":87,"props":1038,"children":1040},{"className":1039},[],[1041],{"type":49,"value":114},{"type":49,"value":1043}," to confirm the tool is attached to the variation (check ",{"type":43,"tag":87,"props":1045,"children":1047},{"className":1046},[],[1048],{"type":49,"value":4},{"type":49,"value":1050}," in the variation's output)",{"type":43,"tag":52,"props":1052,"children":1053},{},[1054],{"type":43,"tag":73,"props":1055,"children":1056},{},[1057],{"type":49,"value":1058},"Report results:",{"type":43,"tag":79,"props":1060,"children":1061},{},[1062,1067,1072],{"type":43,"tag":83,"props":1063,"children":1064},{},[1065],{"type":49,"value":1066},"Tool created with valid schema",{"type":43,"tag":83,"props":1068,"children":1069},{},[1070],{"type":49,"value":1071},"Tool attached to variation",{"type":43,"tag":83,"props":1073,"children":1074},{},[1075],{"type":49,"value":1076},"Flag any issues",{"type":43,"tag":58,"props":1078,"children":1080},{"id":1079},"per-provider-schema-at-the-call-site",[1081],{"type":49,"value":1082},"Per-provider schema at the call site",{"type":43,"tag":52,"props":1084,"children":1085},{},[1086,1088,1094,1096,1101,1103,1109,1111,1117],{"type":49,"value":1087},"LaunchDarkly stores the tool schema once — the flat ",{"type":43,"tag":87,"props":1089,"children":1091},{"className":1090},[],[1092],{"type":49,"value":1093},"{type, name, description, parameters}",{"type":49,"value":1095}," shape you passed to ",{"type":43,"tag":87,"props":1097,"children":1099},{"className":1098},[],[1100],{"type":49,"value":92},{"type":49,"value":1102},". Your application reads it back via ",{"type":43,"tag":87,"props":1104,"children":1106},{"className":1105},[],[1107],{"type":49,"value":1108},"config.model.parameters.tools",{"type":49,"value":1110}," (completion mode) or ",{"type":43,"tag":87,"props":1112,"children":1114},{"className":1113},[],[1115],{"type":49,"value":1116},"agent_config.model.parameters.tools",{"type":49,"value":1118}," (agent mode), then converts to the shape the provider SDK expects. LaunchDarkly never makes the provider call; your code does. The handlers that implement each tool also stay in application code — LaunchDarkly stores the schema, your application owns the behavior.",{"type":43,"tag":1120,"props":1121,"children":1122},"table",{},[1123,1147],{"type":43,"tag":1124,"props":1125,"children":1126},"thead",{},[1127],{"type":43,"tag":1128,"props":1129,"children":1130},"tr",{},[1131,1137,1142],{"type":43,"tag":1132,"props":1133,"children":1134},"th",{},[1135],{"type":49,"value":1136},"Provider \u002F framework",{"type":43,"tag":1132,"props":1138,"children":1139},{},[1140],{"type":49,"value":1141},"Target shape",{"type":43,"tag":1132,"props":1143,"children":1144},{},[1145],{"type":49,"value":1146},"Where it goes on the call",{"type":43,"tag":1148,"props":1149,"children":1150},"tbody",{},[1151,1180,1221,1249,1293,1315,1377],{"type":43,"tag":1128,"props":1152,"children":1153},{},[1154,1160,1169],{"type":43,"tag":1155,"props":1156,"children":1157},"td",{},[1158],{"type":49,"value":1159},"OpenAI Chat Completions (direct SDK)",{"type":43,"tag":1155,"props":1161,"children":1162},{},[1163],{"type":43,"tag":87,"props":1164,"children":1166},{"className":1165},[],[1167],{"type":49,"value":1168},"{type: \"function\", function: {name, description, parameters}}",{"type":43,"tag":1155,"props":1170,"children":1171},{},[1172,1174],{"type":49,"value":1173},"top-level ",{"type":43,"tag":87,"props":1175,"children":1177},{"className":1176},[],[1178],{"type":49,"value":1179},"tools=[...]",{"type":43,"tag":1128,"props":1181,"children":1182},{},[1183,1188,1212],{"type":43,"tag":1155,"props":1184,"children":1185},{},[1186],{"type":49,"value":1187},"Anthropic direct SDK",{"type":43,"tag":1155,"props":1189,"children":1190},{},[1191,1197,1199,1204,1206],{"type":43,"tag":87,"props":1192,"children":1194},{"className":1193},[],[1195],{"type":49,"value":1196},"{name, description, input_schema}",{"type":49,"value":1198}," — rename ",{"type":43,"tag":87,"props":1200,"children":1202},{"className":1201},[],[1203],{"type":49,"value":761},{"type":49,"value":1205}," → ",{"type":43,"tag":87,"props":1207,"children":1209},{"className":1208},[],[1210],{"type":49,"value":1211},"input_schema",{"type":43,"tag":1155,"props":1213,"children":1214},{},[1215,1216],{"type":49,"value":1173},{"type":43,"tag":87,"props":1217,"children":1219},{"className":1218},[],[1220],{"type":49,"value":1179},{"type":43,"tag":1128,"props":1222,"children":1223},{},[1224,1229,1238],{"type":43,"tag":1155,"props":1225,"children":1226},{},[1227],{"type":49,"value":1228},"Bedrock Converse",{"type":43,"tag":1155,"props":1230,"children":1231},{},[1232],{"type":43,"tag":87,"props":1233,"children":1235},{"className":1234},[],[1236],{"type":49,"value":1237},"{toolSpec: {name, description, inputSchema: {json: parameters}}}",{"type":43,"tag":1155,"props":1239,"children":1240},{},[1241,1243],{"type":49,"value":1242},"inside ",{"type":43,"tag":87,"props":1244,"children":1246},{"className":1245},[],[1247],{"type":49,"value":1248},"toolConfig.tools=[...]",{"type":43,"tag":1128,"props":1250,"children":1251},{},[1252,1265,1284],{"type":43,"tag":1155,"props":1253,"children":1254},{},[1255,1257,1263],{"type":49,"value":1256},"Gemini (",{"type":43,"tag":87,"props":1258,"children":1260},{"className":1259},[],[1261],{"type":49,"value":1262},"google-genai",{"type":49,"value":1264},")",{"type":43,"tag":1155,"props":1266,"children":1267},{},[1268,1274,1276,1282],{"type":43,"tag":87,"props":1269,"children":1271},{"className":1270},[],[1272],{"type":49,"value":1273},"{function_declarations: [{name, description, parameters}]}",{"type":49,"value":1275}," (Python) \u002F ",{"type":43,"tag":87,"props":1277,"children":1279},{"className":1278},[],[1280],{"type":49,"value":1281},"{functionDeclarations: [...]}",{"type":49,"value":1283}," (Node)",{"type":43,"tag":1155,"props":1285,"children":1286},{},[1287],{"type":43,"tag":87,"props":1288,"children":1290},{"className":1289},[],[1291],{"type":49,"value":1292},"GenerateContentConfig.tools=[...]",{"type":43,"tag":1128,"props":1294,"children":1295},{},[1296,1301,1306],{"type":43,"tag":1155,"props":1297,"children":1298},{},[1299],{"type":49,"value":1300},"OpenAI Responses API",{"type":43,"tag":1155,"props":1302,"children":1303},{},[1304],{"type":49,"value":1305},"LaunchDarkly's flat shape passes through unchanged",{"type":43,"tag":1155,"props":1307,"children":1308},{},[1309,1310],{"type":49,"value":1173},{"type":43,"tag":87,"props":1311,"children":1313},{"className":1312},[],[1314],{"type":49,"value":1179},{"type":43,"tag":1128,"props":1316,"children":1317},{},[1318,1323,1372],{"type":43,"tag":1155,"props":1319,"children":1320},{},[1321],{"type":49,"value":1322},"LangChain \u002F LangGraph",{"type":43,"tag":1155,"props":1324,"children":1325},{},[1326,1332,1334,1340,1342,1348,1350,1356,1358,1364,1366],{"type":43,"tag":87,"props":1327,"children":1329},{"className":1328},[],[1330],{"type":49,"value":1331},"createLangChainModel(config)",{"type":49,"value":1333}," (Node) \u002F ",{"type":43,"tag":87,"props":1335,"children":1337},{"className":1336},[],[1338],{"type":49,"value":1339},"create_langchain_model(config)",{"type":49,"value":1341}," (Python) and pass ",{"type":43,"tag":87,"props":1343,"children":1345},{"className":1344},[],[1346],{"type":49,"value":1347},"ai_config.tools",{"type":49,"value":1349}," (or your own ",{"type":43,"tag":87,"props":1351,"children":1353},{"className":1352},[],[1354],{"type":49,"value":1355},"StructuredTool",{"type":49,"value":1357}," list) into ",{"type":43,"tag":87,"props":1359,"children":1361},{"className":1360},[],[1362],{"type":49,"value":1363},"bind_tools(...)",{"type":49,"value":1365}," \u002F ",{"type":43,"tag":87,"props":1367,"children":1369},{"className":1368},[],[1370],{"type":49,"value":1371},"create_react_agent(tools=[...])",{"type":43,"tag":1155,"props":1373,"children":1374},{},[1375],{"type":49,"value":1376},"framework-native; no per-call conversion",{"type":43,"tag":1128,"props":1378,"children":1379},{},[1380,1385,1421],{"type":43,"tag":1155,"props":1381,"children":1382},{},[1383],{"type":49,"value":1384},"Strands Agents",{"type":43,"tag":1155,"props":1386,"children":1387},{},[1388,1390,1396,1398,1404,1405,1411,1413,1419],{"type":49,"value":1389},"LaunchDarkly's flat shape; drop ",{"type":43,"tag":87,"props":1391,"children":1393},{"className":1392},[],[1394],{"type":49,"value":1395},"parameters.tools",{"type":49,"value":1397}," before passing params to the Strands model class (",{"type":43,"tag":87,"props":1399,"children":1401},{"className":1400},[],[1402],{"type":49,"value":1403},"AnthropicModel",{"type":49,"value":740},{"type":43,"tag":87,"props":1406,"children":1408},{"className":1407},[],[1409],{"type":49,"value":1410},"OpenAIModel",{"type":49,"value":1412},") — Python ",{"type":43,"tag":87,"props":1414,"children":1416},{"className":1415},[],[1417],{"type":49,"value":1418},"@tool",{"type":49,"value":1420},"-decorated callables stay in code",{"type":43,"tag":1155,"props":1422,"children":1423},{},[1424,1430],{"type":43,"tag":87,"props":1425,"children":1427},{"className":1426},[],[1428],{"type":49,"value":1429},"Agent(tools=[...])",{"type":49,"value":1431}," constructor; no per-call conversion",{"type":43,"tag":52,"props":1433,"children":1434},{},[1435],{"type":49,"value":1436},"Minimal conversion snippets (Python):",{"type":43,"tag":368,"props":1438,"children":1442},{"className":1439,"code":1440,"language":1441,"meta":373,"style":373},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","ld_tools = (ai_config.model.to_dict().get(\"parameters\") or {}).get(\"tools\", []) or []\n\n# OpenAI Chat Completions\nopenai_tools = [\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": t[\"name\"],\n            \"description\": t.get(\"description\", \"\"),\n            \"parameters\": t.get(\"parameters\", {\"type\": \"object\", \"properties\": {}}),\n        },\n    }\n    for t in ld_tools\n]\n\n# Anthropic\nanthropic_tools = [\n    {\n        \"name\": t[\"name\"],\n        \"description\": t.get(\"description\", \"\"),\n        \"input_schema\": t.get(\"parameters\", {\"type\": \"object\", \"properties\": {}}),\n    }\n    for t in ld_tools\n]\n\n# Bedrock Converse\nbedrock_tool_config = {\n    \"tools\": [\n        {\n            \"toolSpec\": {\n                \"name\": t[\"name\"],\n                \"description\": t.get(\"description\", \"\"),\n                \"inputSchema\": {\"json\": t.get(\"parameters\", {\"type\": \"object\", \"properties\": {}})},\n            }\n        }\n        for t in ld_tools\n    ]\n}\n\n# Gemini\ngemini_tools = [\n    {\n        \"function_declarations\": [\n            {\n                \"name\": t[\"name\"],\n                \"description\": t.get(\"description\", \"\"),\n                \"parameters\": t.get(\"parameters\", {\"type\": \"object\", \"properties\": {}}),\n            }\n            for t in ld_tools\n        ]\n    }\n] if ld_tools else []\n","python",[1443],{"type":43,"tag":87,"props":1444,"children":1445},{"__ignoreMap":373},[1446,1454,1463,1471,1479,1487,1495,1503,1511,1520,1529,1538,1547,1556,1564,1572,1581,1590,1598,1607,1615,1624,1632,1640,1648,1656,1665,1674,1683,1692,1701,1710,1719,1728,1737,1746,1755,1764,1772,1780,1789,1798,1806,1815,1824,1832,1840,1849,1857,1866,1875,1883],{"type":43,"tag":379,"props":1447,"children":1448},{"class":381,"line":382},[1449],{"type":43,"tag":379,"props":1450,"children":1451},{},[1452],{"type":49,"value":1453},"ld_tools = (ai_config.model.to_dict().get(\"parameters\") or {}).get(\"tools\", []) or []\n",{"type":43,"tag":379,"props":1455,"children":1456},{"class":381,"line":392},[1457],{"type":43,"tag":379,"props":1458,"children":1460},{"emptyLinePlaceholder":1459},true,[1461],{"type":49,"value":1462},"\n",{"type":43,"tag":379,"props":1464,"children":1465},{"class":381,"line":437},[1466],{"type":43,"tag":379,"props":1467,"children":1468},{},[1469],{"type":49,"value":1470},"# OpenAI Chat Completions\n",{"type":43,"tag":379,"props":1472,"children":1473},{"class":381,"line":463},[1474],{"type":43,"tag":379,"props":1475,"children":1476},{},[1477],{"type":49,"value":1478},"openai_tools = [\n",{"type":43,"tag":379,"props":1480,"children":1481},{"class":381,"line":560},[1482],{"type":43,"tag":379,"props":1483,"children":1484},{},[1485],{"type":49,"value":1486},"    {\n",{"type":43,"tag":379,"props":1488,"children":1489},{"class":381,"line":24},[1490],{"type":43,"tag":379,"props":1491,"children":1492},{},[1493],{"type":49,"value":1494},"        \"type\": \"function\",\n",{"type":43,"tag":379,"props":1496,"children":1497},{"class":381,"line":653},[1498],{"type":43,"tag":379,"props":1499,"children":1500},{},[1501],{"type":49,"value":1502},"        \"function\": {\n",{"type":43,"tag":379,"props":1504,"children":1505},{"class":381,"line":696},[1506],{"type":43,"tag":379,"props":1507,"children":1508},{},[1509],{"type":49,"value":1510},"            \"name\": t[\"name\"],\n",{"type":43,"tag":379,"props":1512,"children":1514},{"class":381,"line":1513},9,[1515],{"type":43,"tag":379,"props":1516,"children":1517},{},[1518],{"type":49,"value":1519},"            \"description\": t.get(\"description\", \"\"),\n",{"type":43,"tag":379,"props":1521,"children":1523},{"class":381,"line":1522},10,[1524],{"type":43,"tag":379,"props":1525,"children":1526},{},[1527],{"type":49,"value":1528},"            \"parameters\": t.get(\"parameters\", {\"type\": \"object\", \"properties\": {}}),\n",{"type":43,"tag":379,"props":1530,"children":1532},{"class":381,"line":1531},11,[1533],{"type":43,"tag":379,"props":1534,"children":1535},{},[1536],{"type":49,"value":1537},"        },\n",{"type":43,"tag":379,"props":1539,"children":1541},{"class":381,"line":1540},12,[1542],{"type":43,"tag":379,"props":1543,"children":1544},{},[1545],{"type":49,"value":1546},"    }\n",{"type":43,"tag":379,"props":1548,"children":1550},{"class":381,"line":1549},13,[1551],{"type":43,"tag":379,"props":1552,"children":1553},{},[1554],{"type":49,"value":1555},"    for t in ld_tools\n",{"type":43,"tag":379,"props":1557,"children":1559},{"class":381,"line":1558},14,[1560],{"type":43,"tag":379,"props":1561,"children":1562},{},[1563],{"type":49,"value":693},{"type":43,"tag":379,"props":1565,"children":1567},{"class":381,"line":1566},15,[1568],{"type":43,"tag":379,"props":1569,"children":1570},{"emptyLinePlaceholder":1459},[1571],{"type":49,"value":1462},{"type":43,"tag":379,"props":1573,"children":1575},{"class":381,"line":1574},16,[1576],{"type":43,"tag":379,"props":1577,"children":1578},{},[1579],{"type":49,"value":1580},"# Anthropic\n",{"type":43,"tag":379,"props":1582,"children":1584},{"class":381,"line":1583},17,[1585],{"type":43,"tag":379,"props":1586,"children":1587},{},[1588],{"type":49,"value":1589},"anthropic_tools = [\n",{"type":43,"tag":379,"props":1591,"children":1593},{"class":381,"line":1592},18,[1594],{"type":43,"tag":379,"props":1595,"children":1596},{},[1597],{"type":49,"value":1486},{"type":43,"tag":379,"props":1599,"children":1601},{"class":381,"line":1600},19,[1602],{"type":43,"tag":379,"props":1603,"children":1604},{},[1605],{"type":49,"value":1606},"        \"name\": t[\"name\"],\n",{"type":43,"tag":379,"props":1608,"children":1609},{"class":381,"line":20},[1610],{"type":43,"tag":379,"props":1611,"children":1612},{},[1613],{"type":49,"value":1614},"        \"description\": t.get(\"description\", \"\"),\n",{"type":43,"tag":379,"props":1616,"children":1618},{"class":381,"line":1617},21,[1619],{"type":43,"tag":379,"props":1620,"children":1621},{},[1622],{"type":49,"value":1623},"        \"input_schema\": t.get(\"parameters\", {\"type\": \"object\", \"properties\": {}}),\n",{"type":43,"tag":379,"props":1625,"children":1627},{"class":381,"line":1626},22,[1628],{"type":43,"tag":379,"props":1629,"children":1630},{},[1631],{"type":49,"value":1546},{"type":43,"tag":379,"props":1633,"children":1635},{"class":381,"line":1634},23,[1636],{"type":43,"tag":379,"props":1637,"children":1638},{},[1639],{"type":49,"value":1555},{"type":43,"tag":379,"props":1641,"children":1643},{"class":381,"line":1642},24,[1644],{"type":43,"tag":379,"props":1645,"children":1646},{},[1647],{"type":49,"value":693},{"type":43,"tag":379,"props":1649,"children":1651},{"class":381,"line":1650},25,[1652],{"type":43,"tag":379,"props":1653,"children":1654},{"emptyLinePlaceholder":1459},[1655],{"type":49,"value":1462},{"type":43,"tag":379,"props":1657,"children":1659},{"class":381,"line":1658},26,[1660],{"type":43,"tag":379,"props":1661,"children":1662},{},[1663],{"type":49,"value":1664},"# Bedrock Converse\n",{"type":43,"tag":379,"props":1666,"children":1668},{"class":381,"line":1667},27,[1669],{"type":43,"tag":379,"props":1670,"children":1671},{},[1672],{"type":49,"value":1673},"bedrock_tool_config = {\n",{"type":43,"tag":379,"props":1675,"children":1677},{"class":381,"line":1676},28,[1678],{"type":43,"tag":379,"props":1679,"children":1680},{},[1681],{"type":49,"value":1682},"    \"tools\": [\n",{"type":43,"tag":379,"props":1684,"children":1686},{"class":381,"line":1685},29,[1687],{"type":43,"tag":379,"props":1688,"children":1689},{},[1690],{"type":49,"value":1691},"        {\n",{"type":43,"tag":379,"props":1693,"children":1695},{"class":381,"line":1694},30,[1696],{"type":43,"tag":379,"props":1697,"children":1698},{},[1699],{"type":49,"value":1700},"            \"toolSpec\": {\n",{"type":43,"tag":379,"props":1702,"children":1704},{"class":381,"line":1703},31,[1705],{"type":43,"tag":379,"props":1706,"children":1707},{},[1708],{"type":49,"value":1709},"                \"name\": t[\"name\"],\n",{"type":43,"tag":379,"props":1711,"children":1713},{"class":381,"line":1712},32,[1714],{"type":43,"tag":379,"props":1715,"children":1716},{},[1717],{"type":49,"value":1718},"                \"description\": t.get(\"description\", \"\"),\n",{"type":43,"tag":379,"props":1720,"children":1722},{"class":381,"line":1721},33,[1723],{"type":43,"tag":379,"props":1724,"children":1725},{},[1726],{"type":49,"value":1727},"                \"inputSchema\": {\"json\": t.get(\"parameters\", {\"type\": \"object\", \"properties\": {}})},\n",{"type":43,"tag":379,"props":1729,"children":1731},{"class":381,"line":1730},34,[1732],{"type":43,"tag":379,"props":1733,"children":1734},{},[1735],{"type":49,"value":1736},"            }\n",{"type":43,"tag":379,"props":1738,"children":1740},{"class":381,"line":1739},35,[1741],{"type":43,"tag":379,"props":1742,"children":1743},{},[1744],{"type":49,"value":1745},"        }\n",{"type":43,"tag":379,"props":1747,"children":1749},{"class":381,"line":1748},36,[1750],{"type":43,"tag":379,"props":1751,"children":1752},{},[1753],{"type":49,"value":1754},"        for t in ld_tools\n",{"type":43,"tag":379,"props":1756,"children":1758},{"class":381,"line":1757},37,[1759],{"type":43,"tag":379,"props":1760,"children":1761},{},[1762],{"type":49,"value":1763},"    ]\n",{"type":43,"tag":379,"props":1765,"children":1767},{"class":381,"line":1766},38,[1768],{"type":43,"tag":379,"props":1769,"children":1770},{},[1771],{"type":49,"value":642},{"type":43,"tag":379,"props":1773,"children":1775},{"class":381,"line":1774},39,[1776],{"type":43,"tag":379,"props":1777,"children":1778},{"emptyLinePlaceholder":1459},[1779],{"type":49,"value":1462},{"type":43,"tag":379,"props":1781,"children":1783},{"class":381,"line":1782},40,[1784],{"type":43,"tag":379,"props":1785,"children":1786},{},[1787],{"type":49,"value":1788},"# Gemini\n",{"type":43,"tag":379,"props":1790,"children":1792},{"class":381,"line":1791},41,[1793],{"type":43,"tag":379,"props":1794,"children":1795},{},[1796],{"type":49,"value":1797},"gemini_tools = [\n",{"type":43,"tag":379,"props":1799,"children":1801},{"class":381,"line":1800},42,[1802],{"type":43,"tag":379,"props":1803,"children":1804},{},[1805],{"type":49,"value":1486},{"type":43,"tag":379,"props":1807,"children":1809},{"class":381,"line":1808},43,[1810],{"type":43,"tag":379,"props":1811,"children":1812},{},[1813],{"type":49,"value":1814},"        \"function_declarations\": [\n",{"type":43,"tag":379,"props":1816,"children":1818},{"class":381,"line":1817},44,[1819],{"type":43,"tag":379,"props":1820,"children":1821},{},[1822],{"type":49,"value":1823},"            {\n",{"type":43,"tag":379,"props":1825,"children":1827},{"class":381,"line":1826},45,[1828],{"type":43,"tag":379,"props":1829,"children":1830},{},[1831],{"type":49,"value":1709},{"type":43,"tag":379,"props":1833,"children":1835},{"class":381,"line":1834},46,[1836],{"type":43,"tag":379,"props":1837,"children":1838},{},[1839],{"type":49,"value":1718},{"type":43,"tag":379,"props":1841,"children":1843},{"class":381,"line":1842},47,[1844],{"type":43,"tag":379,"props":1845,"children":1846},{},[1847],{"type":49,"value":1848},"                \"parameters\": t.get(\"parameters\", {\"type\": \"object\", \"properties\": {}}),\n",{"type":43,"tag":379,"props":1850,"children":1852},{"class":381,"line":1851},48,[1853],{"type":43,"tag":379,"props":1854,"children":1855},{},[1856],{"type":49,"value":1736},{"type":43,"tag":379,"props":1858,"children":1860},{"class":381,"line":1859},49,[1861],{"type":43,"tag":379,"props":1862,"children":1863},{},[1864],{"type":49,"value":1865},"            for t in ld_tools\n",{"type":43,"tag":379,"props":1867,"children":1869},{"class":381,"line":1868},50,[1870],{"type":43,"tag":379,"props":1871,"children":1872},{},[1873],{"type":49,"value":1874},"        ]\n",{"type":43,"tag":379,"props":1876,"children":1878},{"class":381,"line":1877},51,[1879],{"type":43,"tag":379,"props":1880,"children":1881},{},[1882],{"type":49,"value":1546},{"type":43,"tag":379,"props":1884,"children":1886},{"class":381,"line":1885},52,[1887],{"type":43,"tag":379,"props":1888,"children":1889},{},[1890],{"type":49,"value":1891},"] if ld_tools else []\n",{"type":43,"tag":58,"props":1893,"children":1895},{"id":1894},"agent-loop-with-tool-calls",[1896],{"type":49,"value":1897},"Agent loop with tool calls",{"type":43,"tag":52,"props":1899,"children":1900},{},[1901],{"type":49,"value":1902},"An agent that uses tools runs a short loop: call the provider, dispatch any tool calls, loop again, stop when the provider returns a final answer. Three rules apply regardless of provider:",{"type":43,"tag":157,"props":1904,"children":1905},{},[1906,1924,1949],{"type":43,"tag":83,"props":1907,"children":1908},{},[1909,1914,1916,1922],{"type":43,"tag":73,"props":1910,"children":1911},{},[1912],{"type":49,"value":1913},"Bound the loop.",{"type":49,"value":1915}," ",{"type":43,"tag":87,"props":1917,"children":1919},{"className":1918},[],[1920],{"type":49,"value":1921},"MAX_STEPS = 5",{"type":49,"value":1923}," is a safe default. A runaway tool loop is almost always a prompt or schema bug, not a case that needs 50 iterations.",{"type":43,"tag":83,"props":1925,"children":1926},{},[1927,1932,1934,1940,1941,1947],{"type":43,"tag":73,"props":1928,"children":1929},{},[1930],{"type":49,"value":1931},"Track every tool invocation.",{"type":49,"value":1933}," Call ",{"type":43,"tag":87,"props":1935,"children":1937},{"className":1936},[],[1938],{"type":49,"value":1939},"tracker.track_tool_call(tool_name)",{"type":49,"value":1365},{"type":43,"tag":87,"props":1942,"children":1944},{"className":1943},[],[1945],{"type":49,"value":1946},"tracker.trackToolCall(toolName)",{"type":49,"value":1948}," for each tool the agent actually executes. This is what the Monitoring tab counts as tool usage.",{"type":43,"tag":83,"props":1950,"children":1951},{},[1952,1957,1959,1965,1967,1973,1975,1981,1983,1989,1991,1997,1999,2005],{"type":43,"tag":73,"props":1953,"children":1954},{},[1955],{"type":49,"value":1956},"Break on the provider's \"no more tool calls\" signal.",{"type":49,"value":1958}," The exact signal differs per provider: OpenAI Chat Completions → ",{"type":43,"tag":87,"props":1960,"children":1962},{"className":1961},[],[1963],{"type":49,"value":1964},"choice.finish_reason != \"tool_calls\"",{"type":49,"value":1966},"; Anthropic → ",{"type":43,"tag":87,"props":1968,"children":1970},{"className":1969},[],[1971],{"type":49,"value":1972},"response.stop_reason != \"tool_use\"",{"type":49,"value":1974},"; Bedrock Converse → ",{"type":43,"tag":87,"props":1976,"children":1978},{"className":1977},[],[1979],{"type":49,"value":1980},"response[\"stopReason\"] != \"tool_use\"",{"type":49,"value":1982},"; Gemini → ",{"type":43,"tag":87,"props":1984,"children":1986},{"className":1985},[],[1987],{"type":49,"value":1988},"response.function_calls",{"type":49,"value":1990}," empty; OpenAI Responses API → no ",{"type":43,"tag":87,"props":1992,"children":1994},{"className":1993},[],[1995],{"type":49,"value":1996},"function_call",{"type":49,"value":1998}," items in ",{"type":43,"tag":87,"props":2000,"children":2002},{"className":2001},[],[2003],{"type":49,"value":2004},"response.output",{"type":49,"value":2006},".",{"type":43,"tag":52,"props":2008,"children":2009},{},[2010],{"type":49,"value":2011},"Skeleton (Python, Anthropic — the other providers follow the same shape with their own stop-reason check and tool-result formatting):",{"type":43,"tag":368,"props":2013,"children":2015},{"className":1439,"code":2014,"language":1441,"meta":373,"style":373},"messages = [{\"role\": \"user\", \"content\": initial_input}]\nMAX_STEPS = 5\nfor _ in range(MAX_STEPS):\n    response = tracker.track_metrics_of(\n        anthropic_metrics,\n        lambda: anthropic_client.messages.create(\n            model=agent.model.name,\n            system=agent.instructions,\n            messages=messages,\n            tools=anthropic_tools,\n            **params,\n        ),\n    )\n    if response.stop_reason != \"tool_use\":\n        break\n\n    messages.append({\"role\": \"assistant\", \"content\": response.content})\n\n    tool_results = []\n    for block in response.content:\n        if block.type != \"tool_use\":\n            continue\n        if block.name not in tool_handlers:\n            raise ValueError(f\"Unknown tool: {block.name}\")\n        result = tool_handlers[block.name](**block.input)\n        tracker.track_tool_call(block.name)\n        tool_results.append({\n            \"type\": \"tool_result\",\n            \"tool_use_id\": block.id,\n            \"content\": result,\n        })\n    messages.append({\"role\": \"user\", \"content\": tool_results})\n",[2016],{"type":43,"tag":87,"props":2017,"children":2018},{"__ignoreMap":373},[2019,2027,2035,2043,2051,2059,2067,2075,2083,2091,2099,2107,2115,2123,2131,2139,2146,2154,2161,2169,2177,2185,2193,2201,2209,2217,2225,2233,2241,2249,2257,2265],{"type":43,"tag":379,"props":2020,"children":2021},{"class":381,"line":382},[2022],{"type":43,"tag":379,"props":2023,"children":2024},{},[2025],{"type":49,"value":2026},"messages = [{\"role\": \"user\", \"content\": initial_input}]\n",{"type":43,"tag":379,"props":2028,"children":2029},{"class":381,"line":392},[2030],{"type":43,"tag":379,"props":2031,"children":2032},{},[2033],{"type":49,"value":2034},"MAX_STEPS = 5\n",{"type":43,"tag":379,"props":2036,"children":2037},{"class":381,"line":437},[2038],{"type":43,"tag":379,"props":2039,"children":2040},{},[2041],{"type":49,"value":2042},"for _ in range(MAX_STEPS):\n",{"type":43,"tag":379,"props":2044,"children":2045},{"class":381,"line":463},[2046],{"type":43,"tag":379,"props":2047,"children":2048},{},[2049],{"type":49,"value":2050},"    response = tracker.track_metrics_of(\n",{"type":43,"tag":379,"props":2052,"children":2053},{"class":381,"line":560},[2054],{"type":43,"tag":379,"props":2055,"children":2056},{},[2057],{"type":49,"value":2058},"        anthropic_metrics,\n",{"type":43,"tag":379,"props":2060,"children":2061},{"class":381,"line":24},[2062],{"type":43,"tag":379,"props":2063,"children":2064},{},[2065],{"type":49,"value":2066},"        lambda: anthropic_client.messages.create(\n",{"type":43,"tag":379,"props":2068,"children":2069},{"class":381,"line":653},[2070],{"type":43,"tag":379,"props":2071,"children":2072},{},[2073],{"type":49,"value":2074},"            model=agent.model.name,\n",{"type":43,"tag":379,"props":2076,"children":2077},{"class":381,"line":696},[2078],{"type":43,"tag":379,"props":2079,"children":2080},{},[2081],{"type":49,"value":2082},"            system=agent.instructions,\n",{"type":43,"tag":379,"props":2084,"children":2085},{"class":381,"line":1513},[2086],{"type":43,"tag":379,"props":2087,"children":2088},{},[2089],{"type":49,"value":2090},"            messages=messages,\n",{"type":43,"tag":379,"props":2092,"children":2093},{"class":381,"line":1522},[2094],{"type":43,"tag":379,"props":2095,"children":2096},{},[2097],{"type":49,"value":2098},"            tools=anthropic_tools,\n",{"type":43,"tag":379,"props":2100,"children":2101},{"class":381,"line":1531},[2102],{"type":43,"tag":379,"props":2103,"children":2104},{},[2105],{"type":49,"value":2106},"            **params,\n",{"type":43,"tag":379,"props":2108,"children":2109},{"class":381,"line":1540},[2110],{"type":43,"tag":379,"props":2111,"children":2112},{},[2113],{"type":49,"value":2114},"        ),\n",{"type":43,"tag":379,"props":2116,"children":2117},{"class":381,"line":1549},[2118],{"type":43,"tag":379,"props":2119,"children":2120},{},[2121],{"type":49,"value":2122},"    )\n",{"type":43,"tag":379,"props":2124,"children":2125},{"class":381,"line":1558},[2126],{"type":43,"tag":379,"props":2127,"children":2128},{},[2129],{"type":49,"value":2130},"    if response.stop_reason != \"tool_use\":\n",{"type":43,"tag":379,"props":2132,"children":2133},{"class":381,"line":1566},[2134],{"type":43,"tag":379,"props":2135,"children":2136},{},[2137],{"type":49,"value":2138},"        break\n",{"type":43,"tag":379,"props":2140,"children":2141},{"class":381,"line":1574},[2142],{"type":43,"tag":379,"props":2143,"children":2144},{"emptyLinePlaceholder":1459},[2145],{"type":49,"value":1462},{"type":43,"tag":379,"props":2147,"children":2148},{"class":381,"line":1583},[2149],{"type":43,"tag":379,"props":2150,"children":2151},{},[2152],{"type":49,"value":2153},"    messages.append({\"role\": \"assistant\", \"content\": response.content})\n",{"type":43,"tag":379,"props":2155,"children":2156},{"class":381,"line":1592},[2157],{"type":43,"tag":379,"props":2158,"children":2159},{"emptyLinePlaceholder":1459},[2160],{"type":49,"value":1462},{"type":43,"tag":379,"props":2162,"children":2163},{"class":381,"line":1600},[2164],{"type":43,"tag":379,"props":2165,"children":2166},{},[2167],{"type":49,"value":2168},"    tool_results = []\n",{"type":43,"tag":379,"props":2170,"children":2171},{"class":381,"line":20},[2172],{"type":43,"tag":379,"props":2173,"children":2174},{},[2175],{"type":49,"value":2176},"    for block in response.content:\n",{"type":43,"tag":379,"props":2178,"children":2179},{"class":381,"line":1617},[2180],{"type":43,"tag":379,"props":2181,"children":2182},{},[2183],{"type":49,"value":2184},"        if block.type != \"tool_use\":\n",{"type":43,"tag":379,"props":2186,"children":2187},{"class":381,"line":1626},[2188],{"type":43,"tag":379,"props":2189,"children":2190},{},[2191],{"type":49,"value":2192},"            continue\n",{"type":43,"tag":379,"props":2194,"children":2195},{"class":381,"line":1634},[2196],{"type":43,"tag":379,"props":2197,"children":2198},{},[2199],{"type":49,"value":2200},"        if block.name not in tool_handlers:\n",{"type":43,"tag":379,"props":2202,"children":2203},{"class":381,"line":1642},[2204],{"type":43,"tag":379,"props":2205,"children":2206},{},[2207],{"type":49,"value":2208},"            raise ValueError(f\"Unknown tool: {block.name}\")\n",{"type":43,"tag":379,"props":2210,"children":2211},{"class":381,"line":1650},[2212],{"type":43,"tag":379,"props":2213,"children":2214},{},[2215],{"type":49,"value":2216},"        result = tool_handlers[block.name](**block.input)\n",{"type":43,"tag":379,"props":2218,"children":2219},{"class":381,"line":1658},[2220],{"type":43,"tag":379,"props":2221,"children":2222},{},[2223],{"type":49,"value":2224},"        tracker.track_tool_call(block.name)\n",{"type":43,"tag":379,"props":2226,"children":2227},{"class":381,"line":1667},[2228],{"type":43,"tag":379,"props":2229,"children":2230},{},[2231],{"type":49,"value":2232},"        tool_results.append({\n",{"type":43,"tag":379,"props":2234,"children":2235},{"class":381,"line":1676},[2236],{"type":43,"tag":379,"props":2237,"children":2238},{},[2239],{"type":49,"value":2240},"            \"type\": \"tool_result\",\n",{"type":43,"tag":379,"props":2242,"children":2243},{"class":381,"line":1685},[2244],{"type":43,"tag":379,"props":2245,"children":2246},{},[2247],{"type":49,"value":2248},"            \"tool_use_id\": block.id,\n",{"type":43,"tag":379,"props":2250,"children":2251},{"class":381,"line":1694},[2252],{"type":43,"tag":379,"props":2253,"children":2254},{},[2255],{"type":49,"value":2256},"            \"content\": result,\n",{"type":43,"tag":379,"props":2258,"children":2259},{"class":381,"line":1703},[2260],{"type":43,"tag":379,"props":2261,"children":2262},{},[2263],{"type":49,"value":2264},"        })\n",{"type":43,"tag":379,"props":2266,"children":2267},{"class":381,"line":1712},[2268],{"type":43,"tag":379,"props":2269,"children":2270},{},[2271],{"type":49,"value":2272},"    messages.append({\"role\": \"user\", \"content\": tool_results})\n",{"type":43,"tag":52,"props":2274,"children":2275},{},[2276,2278,2284],{"type":49,"value":2277},"Per-provider tool-call payload shapes live in the ",{"type":43,"tag":87,"props":2279,"children":2281},{"className":2280},[],[2282],{"type":49,"value":2283},"built-in-metrics",{"type":49,"value":2285}," references:",{"type":43,"tag":79,"props":2287,"children":2288},{},[2289,2301,2328,2353,2378],{"type":43,"tag":83,"props":2290,"children":2291},{},[2292,2299],{"type":43,"tag":2293,"props":2294,"children":2296},"a",{"href":2295},"..\u002Fbuilt-in-metrics\u002Freferences\u002Fopenai-tracking.md",[2297],{"type":49,"value":2298},"openai-tracking.md",{"type":49,"value":2300}," — Chat Completions + Responses API",{"type":43,"tag":83,"props":2302,"children":2303},{},[2304,2310,2312,2318,2320,2326],{"type":43,"tag":2293,"props":2305,"children":2307},{"href":2306},"..\u002Fbuilt-in-metrics\u002Freferences\u002Fanthropic-tracking.md",[2308],{"type":49,"value":2309},"anthropic-tracking.md",{"type":49,"value":2311}," — ",{"type":43,"tag":87,"props":2313,"children":2315},{"className":2314},[],[2316],{"type":49,"value":2317},"tool_use",{"type":49,"value":2319}," blocks and ",{"type":43,"tag":87,"props":2321,"children":2323},{"className":2322},[],[2324],{"type":49,"value":2325},"tool_result",{"type":49,"value":2327}," payloads",{"type":43,"tag":83,"props":2329,"children":2330},{},[2331,2337,2338,2344,2345,2351],{"type":43,"tag":2293,"props":2332,"children":2334},{"href":2333},"..\u002Fbuilt-in-metrics\u002Freferences\u002Fbedrock-tracking.md",[2335],{"type":49,"value":2336},"bedrock-tracking.md",{"type":49,"value":2311},{"type":43,"tag":87,"props":2339,"children":2341},{"className":2340},[],[2342],{"type":49,"value":2343},"toolUse",{"type":49,"value":1365},{"type":43,"tag":87,"props":2346,"children":2348},{"className":2347},[],[2349],{"type":49,"value":2350},"toolResult",{"type":49,"value":2352}," Converse format",{"type":43,"tag":83,"props":2354,"children":2355},{},[2356,2362,2363,2369,2370,2376],{"type":43,"tag":2293,"props":2357,"children":2359},{"href":2358},"..\u002Fbuilt-in-metrics\u002Freferences\u002Fgemini-tracking.md",[2360],{"type":49,"value":2361},"gemini-tracking.md",{"type":49,"value":2311},{"type":43,"tag":87,"props":2364,"children":2366},{"className":2365},[],[2367],{"type":49,"value":2368},"functionCalls",{"type":49,"value":1365},{"type":43,"tag":87,"props":2371,"children":2373},{"className":2372},[],[2374],{"type":49,"value":2375},"functionResponse",{"type":49,"value":2377}," parts",{"type":43,"tag":83,"props":2379,"children":2380},{},[2381,2387,2389],{"type":43,"tag":2293,"props":2382,"children":2384},{"href":2383},"..\u002Fbuilt-in-metrics\u002Freferences\u002Flangchain-tracking.md",[2385],{"type":49,"value":2386},"langchain-tracking.md",{"type":49,"value":2388}," — LangGraph tool loop inherits from ",{"type":43,"tag":87,"props":2390,"children":2392},{"className":2391},[],[2393],{"type":49,"value":2394},"create_react_agent",{"type":43,"tag":58,"props":2396,"children":2398},{"id":2397},"orchestrator-note",[2399],{"type":49,"value":2400},"Orchestrator Note",{"type":43,"tag":52,"props":2402,"children":2403},{},[2404],{"type":49,"value":2405},"LangGraph, CrewAI, and AutoGen often generate schemas from function definitions. You still need to create tools in LaunchDarkly and attach keys to variations so the SDK knows what's available.",{"type":43,"tag":58,"props":2407,"children":2409},{"id":2408},"edge-cases",[2410],{"type":49,"value":2411},"Edge Cases",{"type":43,"tag":1120,"props":2413,"children":2414},{},[2415,2431],{"type":43,"tag":1124,"props":2416,"children":2417},{},[2418],{"type":43,"tag":1128,"props":2419,"children":2420},{},[2421,2426],{"type":43,"tag":1132,"props":2422,"children":2423},{},[2424],{"type":49,"value":2425},"Situation",{"type":43,"tag":1132,"props":2427,"children":2428},{},[2429],{"type":49,"value":2430},"Action",{"type":43,"tag":1148,"props":2432,"children":2433},{},[2434,2447,2460],{"type":43,"tag":1128,"props":2435,"children":2436},{},[2437,2442],{"type":43,"tag":1155,"props":2438,"children":2439},{},[2440],{"type":49,"value":2441},"Tool already exists (409)",{"type":43,"tag":1155,"props":2443,"children":2444},{},[2445],{"type":49,"value":2446},"Use existing or create with different key",{"type":43,"tag":1128,"props":2448,"children":2449},{},[2450,2455],{"type":43,"tag":1155,"props":2451,"children":2452},{},[2453],{"type":49,"value":2454},"Schema invalid",{"type":43,"tag":1155,"props":2456,"children":2457},{},[2458],{"type":49,"value":2459},"Use raw JSON Schema format (type: object, properties, required)",{"type":43,"tag":1128,"props":2461,"children":2462},{},[2463,2468],{"type":43,"tag":1155,"props":2464,"children":2465},{},[2466],{"type":49,"value":2467},"Wrong endpoint assumed",{"type":43,"tag":1155,"props":2469,"children":2470},{},[2471,2473,2479,2481],{"type":49,"value":2472},"The tools use ",{"type":43,"tag":87,"props":2474,"children":2476},{"className":2475},[],[2477],{"type":49,"value":2478},"\u002Fai-tools",{"type":49,"value":2480},", not ",{"type":43,"tag":87,"props":2482,"children":2484},{"className":2483},[],[2485],{"type":49,"value":2486},"\u002Fai-configs\u002Ftools",{"type":43,"tag":58,"props":2488,"children":2490},{"id":2489},"what-not-to-do",[2491],{"type":49,"value":2492},"What NOT to Do",{"type":43,"tag":79,"props":2494,"children":2495},{},[2496,2501,2506,2511],{"type":43,"tag":83,"props":2497,"children":2498},{},[2499],{"type":49,"value":2500},"Don't try to attach tools during config creation -- update the variation afterward",{"type":43,"tag":83,"props":2502,"children":2503},{},[2504],{"type":49,"value":2505},"Don't skip clear tool descriptions (LLM needs them to decide when to call)",{"type":43,"tag":83,"props":2507,"children":2508},{},[2509],{"type":49,"value":2510},"Don't forget to verify attachment after updating the variation",{"type":43,"tag":83,"props":2512,"children":2513},{},[2514,2516,2521,2522,2527,2528,2533,2534,2539,2541,2546],{"type":49,"value":2515},"Don't bundle ",{"type":43,"tag":87,"props":2517,"children":2519},{"className":2518},[],[2520],{"type":49,"value":738},{"type":49,"value":740},{"type":43,"tag":87,"props":2523,"children":2525},{"className":2524},[],[2526],{"type":49,"value":746},{"type":49,"value":740},{"type":43,"tag":87,"props":2529,"children":2531},{"className":2530},[],[2532],{"type":49,"value":753},{"type":49,"value":755},{"type":43,"tag":87,"props":2535,"children":2537},{"className":2536},[],[2538],{"type":49,"value":761},{"type":49,"value":2540}," into the tool-attachment PATCH. Send ",{"type":43,"tag":87,"props":2542,"children":2544},{"className":2543},[],[2545],{"type":49,"value":4},{"type":49,"value":2547}," alone unless the user explicitly asked for a multi-field update — bundled PATCHes silently clobber UI edits to the other fields.",{"type":43,"tag":58,"props":2549,"children":2551},{"id":2550},"related-skills",[2552],{"type":49,"value":2553},"Related Skills",{"type":43,"tag":79,"props":2555,"children":2556},{},[2557,2568],{"type":43,"tag":83,"props":2558,"children":2559},{},[2560,2566],{"type":43,"tag":87,"props":2561,"children":2563},{"className":2562},[],[2564],{"type":49,"value":2565},"configs-create",{"type":49,"value":2567}," -- Create config before attaching tools",{"type":43,"tag":83,"props":2569,"children":2570},{},[2571,2577],{"type":43,"tag":87,"props":2572,"children":2574},{"className":2573},[],[2575],{"type":49,"value":2576},"configs-variations",{"type":49,"value":2578}," -- Manage variations with different tool sets",{"type":43,"tag":2580,"props":2581,"children":2582},"style",{},[2583],{"type":49,"value":2584},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2586,"total":1859},[2587,2602,2611,2625,2636,2648,2656,2670,2681,2690,2700,2709],{"slug":2588,"name":2588,"fn":2589,"description":2590,"org":2591,"tags":2592,"stars":20,"repoUrl":21,"updatedAt":2601},"agent-graphs","create and manage agent graphs","Create and manage agent graphs — directed graphs of configs connected by edges with handoff logic. Use when building multi-agent workflows where configs route to each other.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2593,2594,2597,2598],{"name":13,"slug":14,"type":15},{"name":2595,"slug":2596,"type":15},"Architecture","architecture",{"name":9,"slug":8,"type":15},{"name":2599,"slug":2600,"type":15},"Multi-Agent","multi-agent","2026-07-28T05:33:33.709407",{"slug":2603,"name":2603,"fn":2604,"description":2605,"org":2606,"tags":2607,"stars":20,"repoUrl":21,"updatedAt":2610},"aiconfig-agent-graphs","manage agent graphs","DEPRECATED redirect — this skill was renamed to agent-graphs. Do not use this skill; invoke agent-graphs instead. Kept only so old references to aiconfig-agent-graphs still point users to the new name.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2608,2609],{"name":13,"slug":14,"type":15},{"name":2595,"slug":2596,"type":15},"2026-05-22T06:55:56.527064",{"slug":2612,"name":2612,"fn":2613,"description":2614,"org":2615,"tags":2616,"stars":20,"repoUrl":21,"updatedAt":2624},"aiconfig-ai-metrics","manage built-in AI metrics","DEPRECATED redirect — this skill was renamed to built-in-metrics. Do not use this skill; invoke built-in-metrics instead. Kept only so old references to aiconfig-ai-metrics still point users to the new name.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2617,2620,2621],{"name":2618,"slug":2619,"type":15},"Analytics","analytics",{"name":9,"slug":8,"type":15},{"name":2622,"slug":2623,"type":15},"Metrics","metrics","2026-05-22T06:55:53.858749",{"slug":2626,"name":2626,"fn":2627,"description":2628,"org":2629,"tags":2630,"stars":20,"repoUrl":21,"updatedAt":2635},"aiconfig-create","redirect to configs-create skill","DEPRECATED redirect — this skill was renamed to configs-create. Do not use this skill; invoke configs-create instead. Kept only so old references to aiconfig-create still point users to the new name.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2631,2632],{"name":9,"slug":8,"type":15},{"name":2633,"slug":2634,"type":15},"Reference","reference","2026-05-22T06:55:41.790591",{"slug":2637,"name":2637,"fn":2638,"description":2639,"org":2640,"tags":2641,"stars":20,"repoUrl":21,"updatedAt":2647},"aiconfig-custom-metrics","configure custom metrics in LaunchDarkly","DEPRECATED redirect — this skill was renamed to custom-metrics. Do not use this skill; invoke custom-metrics instead. Kept only so old references to aiconfig-custom-metrics still point users to the new name.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2642,2643,2646],{"name":2618,"slug":2619,"type":15},{"name":2644,"slug":2645,"type":15},"Feature Flags","feature-flags",{"name":9,"slug":8,"type":15},"2026-05-22T06:55:57.84851",{"slug":2649,"name":2649,"fn":2650,"description":2651,"org":2652,"tags":2653,"stars":20,"repoUrl":21,"updatedAt":2655},"aiconfig-migrate","redirect to migrate skill","DEPRECATED redirect — this skill was renamed to migrate. Do not use this skill; invoke migrate instead. Kept only so old references to aiconfig-migrate still point users to the new name.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2654],{"name":2633,"slug":2634,"type":15},"2026-05-22T06:55:44.464733",{"slug":2657,"name":2657,"fn":2658,"description":2659,"org":2660,"tags":2661,"stars":20,"repoUrl":21,"updatedAt":2669},"aiconfig-online-evals","run online evaluations","DEPRECATED redirect — this skill was renamed to online-evals. Do not use this skill; invoke online-evals instead. Kept only so old references to aiconfig-online-evals still point users to the new name.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2662,2665,2666],{"name":2663,"slug":2664,"type":15},"Evals","evals",{"name":9,"slug":8,"type":15},{"name":2667,"slug":2668,"type":15},"Testing","testing","2026-05-22T06:55:55.179617",{"slug":2671,"name":2671,"fn":2672,"description":2673,"org":2674,"tags":2675,"stars":20,"repoUrl":21,"updatedAt":2680},"aiconfig-projects","manage AI configuration projects","DEPRECATED redirect — this skill was renamed to projects. Do not use this skill; invoke projects instead. Kept only so old references to aiconfig-projects still point users to the new name.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2676,2679],{"name":2677,"slug":2678,"type":15},"Configuration","configuration",{"name":9,"slug":8,"type":15},"2026-05-22T06:55:48.522229",{"slug":2682,"name":2682,"fn":2683,"description":2684,"org":2685,"tags":2686,"stars":20,"repoUrl":21,"updatedAt":2689},"aiconfig-snippets","manage AI configuration snippets","DEPRECATED redirect — this skill was renamed to snippets. Do not use this skill; invoke snippets instead. Kept only so old references to aiconfig-snippets still point users to the new name.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2687,2688],{"name":2677,"slug":2678,"type":15},{"name":9,"slug":8,"type":15},"2026-05-22T06:55:47.16557",{"slug":2691,"name":2691,"fn":2692,"description":2693,"org":2694,"tags":2695,"stars":20,"repoUrl":21,"updatedAt":2699},"aiconfig-targeting","configure LaunchDarkly targeting rules","DEPRECATED redirect — this skill was renamed to configs-targeting. Do not use this skill; invoke configs-targeting instead. Kept only so old references to aiconfig-targeting still point users to the new name.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2696,2697,2698],{"name":2677,"slug":2678,"type":15},{"name":2644,"slug":2645,"type":15},{"name":9,"slug":8,"type":15},"2026-05-22T06:55:49.845445",{"slug":2701,"name":2701,"fn":2702,"description":2703,"org":2704,"tags":2705,"stars":20,"repoUrl":21,"updatedAt":2708},"aiconfig-tools","redirect to tools skill","DEPRECATED redirect — this skill was renamed to tools. Do not use this skill; invoke tools instead. Kept only so old references to aiconfig-tools still point users to the new name.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2706,2707],{"name":9,"slug":8,"type":15},{"name":2633,"slug":2634,"type":15},"2026-05-22T06:55:39.13373",{"slug":2710,"name":2710,"fn":2711,"description":2712,"org":2713,"tags":2714,"stars":20,"repoUrl":21,"updatedAt":2717},"aiconfig-update","redirect to configs-update skill","DEPRECATED redirect — this skill was renamed to configs-update. Do not use this skill; invoke configs-update instead. Kept only so old references to aiconfig-update still point users to the new name.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2715,2716],{"name":9,"slug":8,"type":15},{"name":2633,"slug":2634,"type":15},"2026-05-22T06:55:40.464884",{"items":2719,"total":1859},[2720,2727,2732,2738,2743,2749,2753],{"slug":2588,"name":2588,"fn":2589,"description":2590,"org":2721,"tags":2722,"stars":20,"repoUrl":21,"updatedAt":2601},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2723,2724,2725,2726],{"name":13,"slug":14,"type":15},{"name":2595,"slug":2596,"type":15},{"name":9,"slug":8,"type":15},{"name":2599,"slug":2600,"type":15},{"slug":2603,"name":2603,"fn":2604,"description":2605,"org":2728,"tags":2729,"stars":20,"repoUrl":21,"updatedAt":2610},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2730,2731],{"name":13,"slug":14,"type":15},{"name":2595,"slug":2596,"type":15},{"slug":2612,"name":2612,"fn":2613,"description":2614,"org":2733,"tags":2734,"stars":20,"repoUrl":21,"updatedAt":2624},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2735,2736,2737],{"name":2618,"slug":2619,"type":15},{"name":9,"slug":8,"type":15},{"name":2622,"slug":2623,"type":15},{"slug":2626,"name":2626,"fn":2627,"description":2628,"org":2739,"tags":2740,"stars":20,"repoUrl":21,"updatedAt":2635},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2741,2742],{"name":9,"slug":8,"type":15},{"name":2633,"slug":2634,"type":15},{"slug":2637,"name":2637,"fn":2638,"description":2639,"org":2744,"tags":2745,"stars":20,"repoUrl":21,"updatedAt":2647},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2746,2747,2748],{"name":2618,"slug":2619,"type":15},{"name":2644,"slug":2645,"type":15},{"name":9,"slug":8,"type":15},{"slug":2649,"name":2649,"fn":2650,"description":2651,"org":2750,"tags":2751,"stars":20,"repoUrl":21,"updatedAt":2655},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2752],{"name":2633,"slug":2634,"type":15},{"slug":2657,"name":2657,"fn":2658,"description":2659,"org":2754,"tags":2755,"stars":20,"repoUrl":21,"updatedAt":2669},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2756,2757,2758],{"name":2663,"slug":2664,"type":15},{"name":9,"slug":8,"type":15},{"name":2667,"slug":2668,"type":15}]