[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6J17DG0NHERHZJ9W934KGYJ":3,"skill-same:01M6J17DG0NHERHZJ9W934KGYJ":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":52,"ownerHtmlUrl":53,"ownerBlogUrl":54,"ownerDescription":55,"updatedAt":56,"install":57,"resources":70},"01M6J17DG0NHERHZJ9W934KGYJ","liter-llm-tool-calling",null,"Use when defining functions\u002Ftools for an LLM to call through liter-llm, or requesting structured JSON outputs. Covers tool schemas, tool_calls handling, and response formats.","xberg-io\u002Fliter-llm","xberg-io","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F241328462?v=4","01M6BYYMACFMK5WNT338Y71K58","Xberg.io","01M6J160RA8VS7XVE01W9305F3",266,"MIT","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fplugin\u002F.ai-rulez\u002Fskills\u002Fliter-llm-tool-calling\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"tool","llm tool","liter llm","liter llm tool calling","calling","tool calling","structured","when","outputs","for","formats","calls","playbook","call","functions","use","json","Tools","2026-11-10 10:12:30",false,"---\ntype: Playbook\ntitle: Tool Calling\ndescription: Use when defining functions\u002Ftools for an LLM to call through liter-llm, or requesting structured JSON outputs. Covers tool schemas, tool_calls handling, and response formats.\nx-ai-rulez:\n  kind: skill\n  id: liter-llm-tool-calling\n  metadata:\n    name: liter-llm-tool-calling\n---\n\n# Tool Calling\n\nPass a `tools` array of function definitions; the model may respond with\n`tool_calls` instead of (or alongside) text. Execute the named function and feed\nthe result back as a `tool` message.\n\n## Python\n\n```python\nimport asyncio, json, os\nfrom liter_llm import create_client\nfrom liter_llm._internal_bindings import ChatCompletionRequest\n\npayload = {\n    \"model\": \"openai\u002Fgpt-4o\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"What is the weather in Berlin?\"}],\n    \"tools\": [\n        {\n            \"type\": \"function\",\n            \"function\": {\n                \"name\": \"get_weather\",\n                \"description\": \"Get the current weather for a location\",\n                \"parameters\": {\n                    \"type\": \"object\",\n                    \"properties\": {\n                        \"location\": {\"type\": \"string\", \"description\": \"City name\"},\n                    },\n                    \"required\": [\"location\"],\n                },\n            },\n        }\n    ],\n    \"tool_choice\": \"auto\",\n}\n\nasync def main() -> None:\n    client = create_client(api_key=os.environ[\"OPENAI_API_KEY\"])\n    request = ChatCompletionRequest.from_json(json.dumps(payload))\n    response = await client.chat(request)\n    for call in response.choices[0].message.tool_calls or []:\n        print(call.function.name, call.function.arguments)  # arguments is a JSON string\n\nasyncio.run(main())\n```\n\n## Structured outputs\n\nRequest strict JSON with `response_format`:\n\n```python\nrequest = ChatCompletionRequest.from_json(json.dumps({\n    \"model\": \"openai\u002Fgpt-4o\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Extract name and age as JSON.\"}],\n    \"response_format\": {\"type\": \"json_object\"},\n}))\nresponse = await client.chat(request)\n```\n\n## Notes\n\n- `function.arguments` is a JSON **string** — parse it before use.\n- Append each tool result as a message with `role=\"tool\"` and the matching\n  `tool_call_id`, then call `chat` again to let the model continue.\n- Tool support and JSON-mode availability vary by provider; check the provider\n  reference if a model ignores `tools`.\n","# Tool Calling\n\nPass a `tools` array of function definitions; the model may respond with\n`tool_calls` instead of (or alongside) text. Execute the named function and feed\nthe result back as a `tool` message.\n\n## Python\n\n```python\nimport asyncio, json, os\nfrom liter_llm import create_client\nfrom liter_llm._internal_bindings import ChatCompletionRequest\n\npayload = {\n    \"model\": \"openai\u002Fgpt-4o\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"What is the weather in Berlin?\"}],\n    \"tools\": [\n        {\n            \"type\": \"function\",\n            \"function\": {\n                \"name\": \"get_weather\",\n                \"description\": \"Get the current weather for a location\",\n                \"parameters\": {\n                    \"type\": \"object\",\n                    \"properties\": {\n                        \"location\": {\"type\": \"string\", \"description\": \"City name\"},\n                    },\n                    \"required\": [\"location\"],\n                },\n            },\n        }\n    ],\n    \"tool_choice\": \"auto\",\n}\n\nasync def main() -> None:\n    client = create_client(api_key=os.environ[\"OPENAI_API_KEY\"])\n    request = ChatCompletionRequest.from_json(json.dumps(payload))\n    response = await client.chat(request)\n    for call in response.choices[0].message.tool_calls or []:\n        print(call.function.name, call.function.arguments)  # arguments is a JSON string\n\nasyncio.run(main())\n```\n\n## Structured outputs\n\nRequest strict JSON with `response_format`:\n\n```python\nrequest = ChatCompletionRequest.from_json(json.dumps({\n    \"model\": \"openai\u002Fgpt-4o\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Extract name and age as JSON.\"}],\n    \"response_format\": {\"type\": \"json_object\"},\n}))\nresponse = await client.chat(request)\n```\n\n## Notes\n\n- `function.arguments` is a JSON **string** — parse it before use.\n- Append each tool result as a message with `role=\"tool\"` and the matching\n  `tool_call_id`, then call `chat` again to let the model continue.\n- Tool support and JSON-mode availability vary by provider; check the provider\n  reference if a model ignores `tools`.\n",{"type":42,"title":43,"x-ai-rulez":44,"description":7},"Playbook","Tool Calling",{"id":5,"kind":45,"metadata":46},"skill",{"name":5},"main","81dd58501327dc68d81676f236766c08c0d31deb","plugin\u002F.ai-rulez\u002Fskills\u002Fliter-llm-tool-calling",27,"https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm","https:\u002F\u002Fdocs.liter-llm.xberg.io","https:\u002F\u002Fgithub.com\u002Fxberg-io","https:\u002F\u002Fxberg.io","Open-source content intelligence with a Rust core: documents, web, LLMs and code, with native bindings for every major language.","2026-11-14 23:17:35",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add xberg-io\u002Fliter-llm --skill liter-llm-tool-calling",{"tool":63,"command":64},"bunx","bunx skills add xberg-io\u002Fliter-llm --skill liter-llm-tool-calling",{"tool":66,"command":67},"pnpm","pnpm dlx skills add xberg-io\u002Fliter-llm --skill liter-llm-tool-calling","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fplugin\u002F.ai-rulez\u002Fskills\u002Fliter-llm-tool-calling\u002FSKILL.md",true,[71],{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"index.md","REFERENCE","参考文档",216,"https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fplugin\u002F.ai-rulez\u002Fskills\u002Fliter-llm-tool-calling\u002Findex.md",[78,103,117,122,139,162],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":37},"01M6J1DRP0968S21HH1C4HR9RK","liter-llm","Universal LLM API client for 174 providers with native bindings for 14 languages. Use when writing code that calls LLM APIs via liter-llm in Python, TypeScript, Rust, Go, Java, C#, Ruby, PHP, Elixir, WASM, or C, when running the OpenAI-compatible proxy, or when calling LLMs through the MCP server. Covers chat, streaming, tool calling, embeddings, image generation, speech, transcription, moderation, web search, OCR, reranking, provider routing, middleware, and configuration.","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fskills\u002Fliter-llm\u002FSKILL.md",[],[21,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,26],"ocr","web search","search","rust","middleware","ruby","MCP","writing","image","mcp server","code","api","io","streaming","llms","server","native","elixir",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":37},"01M6J1DK94H9KDPW62F1E96VRR","liter-llm-using-the-mcp-server","Use when calling LLM APIs through the liter-llm MCP server's 22 tools, and to decide when MCP beats the CLI or SDK. Covers the tool surface, the auto-installing launcher, and authentication.","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fskills\u002Fliter-llm-using-the-mcp-server\u002FSKILL.md",[],[91,94,110,100,21,111,112,113,19,23,114,34,115,116,36,26],"liter llm using the mcp server","launcher","decide","authentication","auto","cli","sdk",{"skillNo":118,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":37},"01M6J1DEEPNVQ3E5CX5ZF69416","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fskills\u002Fliter-llm-tool-calling\u002FSKILL.md",[],[24,19,23,22,21,20,28,30,32,34,33,35,29,36,25,27,26],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":37},"01M6J1DBN4XD93NN04WA8ZP75H","liter-llm-streaming-responses","Use when streaming tokens incrementally from an LLM via liter-llm over SSE or async iterators. Covers chat_stream, delta handling, and null-content chunks.","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fskills\u002Fliter-llm-streaming-responses\u002FSKILL.md",[],[129,21,98,130,131,132,133,134,34,135,136,137,138,26],"liter llm streaming responses","chat","delta","via","tokens","async","content","sse","chunks","stream",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":37},"01M6J1D76FTYTKSPWNNRVZ2PX3","liter-llm-running-the-proxy","Use when running the `liter-llm api` OpenAI-compatible gateway — virtual keys, per-key rate limits, budgets, cost tracking, and model routing. Covers the TOML config and the 22 REST endpoints.","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fskills\u002Fliter-llm-running-the-proxy\u002FSKILL.md",[],[146,147,21,148,149,150,151,152,153,34,96,154,155,156,157,158,159,160,161,26],"proxy","liter llm running the proxy","running","openai-compatible","virtual","gateway","model","toml","cost","routing","REST","endpoints","keys","config","limits","llm api",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":37},"01M6J1D2W434JGGHXR8SP91PZ3","liter-llm-embeddings-and-search","Use when generating embeddings, calling the 12 web-search providers, or running OCR over documents with the 4 OCR providers through liter-llm. Covers embed, search, and ocr methods plus reranking.","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fskills\u002Fliter-llm-embeddings-and-search\u002FSKILL.md",[],[87,169,21,170,85,171,23,34,172,173,174,175,176,177,178,148,26],"liter llm embeddings and search","embeddings","methods","documents","embed","with","web","web-search","Providers","reranking"]