MP-101 · Module 2
Tools
3 min read
Tools are the most used MCP primitive. A tool is an executable action that the AI model can invoke — create a file, run a database query, send a message, deploy a service. Each tool has a name, a description, and a JSON Schema that defines its input parameters. When the model decides to use a tool, it constructs the input according to the schema, the MCP client sends the request to the server, the server executes the action, and the result flows back to the model.
The key design decision: the AI model decides when to call a tool based on the tool's name and description. This means tool naming and descriptions are not documentation — they are the interface the model uses to reason about what to invoke. A tool named "query_database" with a description "Executes a read-only SQL query against the PostgreSQL database and returns results as JSON" gives the model everything it needs. A tool named "do_thing" with no description is invisible to the model's reasoning.
{
"name": "read_file",
"description": "Reads the contents of a file at the given path. Returns the file content as text.",
"inputSchema": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Absolute path to the file to read"
}
},
"required": ["path"]
}
}