← All notes

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.

See also

Claims

Sources

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

Permanent ID: iil:note:ha6xzfvs

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.},
}

Markdown

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.