Prompt Buddy logoPrompt Buddy

openai · OpenAI Platform Docs

Using tools | OpenAI API

Teaches how to implement function calling by defining tool schemas, enabling model tool selection, and handling the execution loop between the model and external functions.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Using tools | OpenAI API

Teaches how to implement function calling by defining tool schemas, enabling model tool selection, and handling the execution loop between the model and external functions.

When To Use

Use when you need to enable an LLM to interact with external APIs, databases, or custom code through structured function calling.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/using-tools-openai-api-workflow-guide.mdA guide explaining how to extend model capabilities using built-in tools, function calling, tool search, and remote MCP servers via the OpenAI API.Questions about a guide explaining how to extend model capabilities using built-in tools, function calling, tool search, and remote M...
examples/using-tools-openai-api-openai-api-tools-nodejs-implementation.textA Node.js code example demonstrating how to initialize an OpenAI client and use the tools parameter within a responses create request.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to initialize an OpenAI client and use the tools parameter within a response...
examples/using-tools-openai-api-openai-api-python-tools-websearch.textA Python code example demonstrating how to use the websearch tool within an OpenAI API request.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the websearch tool within an OpenAI API request.
examples/using-tools-openai-api-openai-api-tools-websearch-curl-request.textA curl command demonstrating how to include a websearch tool in an OpenAI API request.Exact payloads, commands, or snippets shown in A curl command demonstrating how to include a websearch tool in an OpenAI API request.
examples/using-tools-openai-api-openai-api-tools-function-calling-cli.textA CLI command demonstrating how to pass tool definitions to the OpenAI API using a YAML-formatted input.Exact payloads, commands, or snippets shown in A CLI command demonstrating how to pass tool definitions to the OpenAI API using a YAML-formatted input.
examples/using-tools-openai-api-openai-api-csharp-tool-use.textA C# code example demonstrating how to initialize an OpenAI client and configure tool definitions for model responses.Exact payloads, commands, or snippets shown in A C# code example demonstrating how to initialize an OpenAI client and configure tool definitions for model responses.
examples/using-tools-openai-api-openai-api-python-tool-filesearch.textA Python code example demonstrating how to use the filesearch tool within an OpenAI API request.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the filesearch tool within an OpenAI API request.
examples/using-tools-openai-api-openai-api-filesearch-tool-nodejs.textA Node.js code example demonstrating how to use the filesearch tool within an OpenAI API response request.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to use the filesearch tool within an OpenAI API response request.
examples/using-tools-openai-api-openai-api-csharp-tool-use-2.textA C# code example demonstrating how to initialize an OpenAI client and configure tool use within response creation options.Exact payloads, commands, or snippets shown in A C# code example demonstrating how to initialize an OpenAI client and configure tool use within response creation op...
examples/using-tools-openai-api-openai-api-python-tool-definition-namespace.textA Python code example demonstrating how to define a tool using a namespace containing multiple function definitions for the OpenAI API.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to define a tool using a namespace containing multiple function definitions f...
examples/using-tools-openai-api-openai-api-tools-function-calling-javascript.textA JavaScript code example demonstrating how to define tool namespaces and function definitions for use with the OpenAI API.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to define tool namespaces and function definitions for use with the OpenA...
examples/using-tools-openai-api-openai-api-tools-function-calling-javascript-2.textA JavaScript code example demonstrating how to define tool functions and pass them to the OpenAI API client.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to define tool functions and pass them to the OpenAI API client.
examples/using-tools-openai-api-openai-api-python-function-calling-tool.textA Python code example demonstrating how to define and use function calling tools with the OpenAI client.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to define and use function calling tools with the OpenAI client.
examples/using-tools-openai-api-openai-api-csharp-function-calling-tools.textA C# code example demonstrating how to define and use tools with the OpenAI API using System.Text.Json.Exact payloads, commands, or snippets shown in A C# code example demonstrating how to define and use tools with the OpenAI API using System.Text.Json.
examples/using-tools-openai-api-openai-api-tools-function-calling-curl-request.textA curl command demonstrating how to send a request to the OpenAI API using the tools parameter for function calling.Exact payloads, commands, or snippets shown in A curl command demonstrating how to send a request to the OpenAI API using the tools parameter for function calling.
examples/using-tools-openai-api-openai-api-tools-curl-request.textA curl command demonstrating how to send a request to the OpenAI API using the tools parameter with an MCP server configuration.Exact payloads, commands, or snippets shown in A curl command demonstrating how to send a request to the OpenAI API using the tools parameter with an MCP server con...
examples/using-tools-openai-api-openai-api-mcp-tool-usage.textA JavaScript code snippet demonstrating how to use the OpenAI API to call a Model Context Protocol (MCP) tool.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to use the OpenAI API to call a Model Context Protocol (MCP) tool.
examples/using-tools-openai-api-openai-api-python-tools-mcp-implementation.textA Python code example demonstrating how to define and use Model Context Protocol (MCP) tools within an OpenAI API client request.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to define and use Model Context Protocol (MCP) tools within an OpenAI API cli...
examples/using-tools-openai-api-openai-api-csharp-tool-calling.textA C# code example demonstrating how to implement tool calling using the OpenAI API client.Exact payloads, commands, or snippets shown in A C# code example demonstrating how to implement tool calling using the OpenAI API client.
examples/using-tools-openai-api-openai-api-tools-function-definition-javascript.textA JavaScript code example demonstrating how to define a tool with a name, description, and Zod schema for the OpenAI API.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to define a tool with a name, description, and Zod schema for the OpenAI...
examples/using-tools-openai-api-openai-api-python-function-tool-definition.textA Python code example demonstrating how to define a tool using the @functiontool decorator for the OpenAI API.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to define a tool using the @functiontool decorator for the OpenAI API.
examples/using-tools-openai-api-openai-api-agent-tool-definition-javascript.textA JavaScript code example demonstrating how to define an agent and assign a summarizer tool to a research assistant agent using the OpenAI API.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to define an agent and assign a summarizer tool to a research assistant a...
examples/using-tools-openai-api-openai-api-python-agent-tool-usage.textA Python code example demonstrating how to define an agent with a tool and assign it to a main research assistant agent.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to define an agent with a tool and assign it to a main research assistant agent.

What This Skill Covers

  • When generating model responses or building agents, you can extend capabilities using built‑in tools, function calling, tool search, and remote MCP servers....
  • Main sections: Available tools, Usage in the API, Usage in the Agents SDK.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.openai.com/api/docs/guides/tools