Skip to main content
Glama
khuber
by khuber

add_tool

Create a new Python tool by defining its name, description, input schema, and source code. Use this to extend the server with custom callable functions.

Instructions

Add a new Python tool. Use edit_tool to change an existing tool. source must define main(arguments), sync or async, returning JSON. input_schema describes the arguments object using JSON Schema 2020-12. The add_tool, edit_tool and remove_tool built-ins are permanent. Code executes with the server user's OS permissions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
sourceYes
descriptionYes
input_schemaYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
statusYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint=false, so mutation is expected. The description adds meaningful behavioral context: source must define main(arguments), be sync or async, return JSON, and code executes with the server user's OS permissions. It also discloses that add_tool, edit_tool, and remove_tool are permanent built-ins.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences with no filler. The core purpose is front-loaded, followed by the sibling distinction and then the key technical constraints, making it highly scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool-definition operation with four required parameters and a nested input_schema, the description covers the critical contract: function signature, sync/async support, return type, JSON Schema version, OS permissions, and built-in permanence. With an output schema present, return-value documentation is not needed. It lacks an explicit note about name uniqueness but is otherwise substantial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does add essential semantics for source and input_schema: source must define main(arguments) and return JSON, and input_schema uses JSON Schema 2020-12. However, it provides no additional meaning for the name or description parameters beyond their schema constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Add a new Python tool.' It clearly distinguishes itself from siblings by explicitly saying 'Use edit_tool to change an existing tool,' so an agent can tell add_tool apart from edit_tool and remove_tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit guidance: use this tool to add a new tool, and use edit_tool to change an existing one. It also notes that built-in tools are permanent, which warns against attempting to remove or edit them.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools