Write a tool name, description, and argument schema the model can use
Answer: Give every tool a unique name, a clear description, and a schema for its arguments. In the OpenAI Agents SDK, the function's docstring can supply that description. In MCP, the name plus metadata describes the schema.
Why it matters
Tools let agents take actions such as fetching data or calling APIs. When you wrap a Python function as a tool, the tool description will be taken from the docstring of the function. You can provide a description instead. Descriptions for each input are taken from the docstring of the function, unless disabled. The input schema is created from the function's arguments.
The Model Context Protocol allows servers to expose tools that language models can invoke. Each tool is uniquely identified by a name and includes metadata describing its schema. Tool names SHOULD be unique within a server. Tool names SHOULD be considered case-sensitive. If a tool fails, clients SHOULD provide tool execution errors to language models to enable self-correction.
Name plus descriptionThe model uses both to decide whether to call the toolArgument schemaBuilt from the function's arguments and docstringUnique, case-sensitive namesTool names SHOULD be unique within a server
See also
Claims
- id: C1 claim: A function tool can take its description from the function's docstring. source: S1 evidence: "Tool description will be taken from the docstring of the function"
- id: C2 claim: The input schema can be created automatically from the function's arguments. source: S1 evidence: "The schema for the function inputs is automatically created from the function's arguments"
- id: C3 claim: An MCP tool is identified by a name plus metadata that describes its schema. source: S2 evidence: "Each tool is uniquely identified by a name and includes metadata describing its schema."
Sources
- [S1] Tools. OpenAI Agents SDK. https://github.com/openai/openai-agents-python/blob/main/docs/tools.md . License: MIT. Accessed 2026-11-22.
- [S2] Tools. Model Context Protocol. https://modelcontextprotocol.io/specification/2025-11-25/server/tools . License: Apache-2.0. Accessed 2026-11-22.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: OpenAI Agents SDK, Tools, MIT; Model Context Protocol, Tools specification, Apache-2.0. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: OpenAI Agents SDK, Tools, MIT; Model Context Protocol, Tools specification, Apache-2.0.
Cite this
iinventedlight. 2026. "Write a tool name, description, and argument schema the model can use." iinventedlight Library, iil:note:ha6xzfvs, version of 2026-11-22. https://iinventedlight.com/library/notes/writing-tool-descriptions/. License: CC-BY-4.0.
@misc{iil_note_ha6xzfvs,
author = {{iinventedlight}},
title = {{Write a tool name, description, and argument schema the model can use}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-22},
url = {https://iinventedlight.com/library/notes/writing-tool-descriptions/},
note = {Permanent ID iil:note:ha6xzfvs. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/writing-tool-descriptions.md.