Skip to main content
Glama

datetime_add_duration

Add or subtract days, hours, minutes, or seconds to/from a datetime string. This tool computes a new datetime based on a given datetime and a duration, enabling date and time arithmetic for AI workflows.

Instructions

[datetime] Add (or subtract) a duration to a datetime.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dt_strYes
daysNo
hoursNo
minutesNo
secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description must disclose behavioral traits. It only states the basic operation without mentioning return type, timezone handling, or error cases. The agent has insufficient information about the tool's behavior beyond the core function.

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

Conciseness4/5

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

The description is a single sentence with no waste. It is concise and front-loaded. However, it could be restructured to include critical parameter info without increasing length significantly.

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

Completeness3/5

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

Given the presence of an output schema (true), the description does not need to explain return values. However, it lacks crucial context such as expected input format or whether subtraction is achieved via negative values. It is adequate for a simple tool but not fully complete.

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

Parameters2/5

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

Schema description coverage is 0%, so the description should compensate by explaining parameters. It does not describe dt_str format (e.g., ISO 8601) or valid ranges for duration components. The parameter names are self-explanatory, but no additional semantic value is added.

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

Purpose4/5

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

The description 'Add (or subtract) a duration to a datetime' clearly identifies the action (add/subtract) and the resource (datetime). It distinguishes this tool from sibling datetime tools like datetime_convert_timezone or datetime_format_dt, though it could be more specific about the input format.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as datetime_diff or datetime_parse. There is no mention of context, prerequisites, or exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/0-co/agent-friend'

If you have feedback or need assistance with the MCP directory API, please join our Discord server