Skip to main content
Glama

TinyFn

subtract_time

Subtract time from a date.

Input Schema

NameRequiredDescriptionDefault
dateYesStart date (ISO format)
daysNoDays to subtract
hoursNoHours to subtract
weeksNoWeeks to subtract
minutesNoMinutes to subtract
secondsNoSeconds to subtract

Output Schema

NameRequiredDescriptionDefault
codeNo
errorNo
resultNo
originalNo
subtractedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedOutput schema / $defs / SubtractTimeResponse
      Removed value: -{
      -  "properties": {
      -    "code": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Code"
      -    },
      -    "error": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Error"
      -    },
      -    "original": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Original"
      -    },
      -    "result": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Result"
      -    },
      -    "subtracted": {
      -      "anyOf": [
      -        {
      -          "$ref": "#/$defs/TimeDelta"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    }
      -  },
      -  "title": "SubtractTimeResponse",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / app__routers__datetime_utils__SubtractTimeResponse
      Added value: +{
      +  "properties": {
      +    "code": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Code"
      +    },
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Error"
      +    },
      +    "original": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Original"
      +    },
      +    "result": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Result"
      +    },
      +    "subtracted": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/TimeDelta"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "title": "SubtractTimeResponse",
      +  "type": "object"
      +}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"SubtractTimeResponse"New value: +"app__routers__datetime_utils__SubtractTimeResponse"
  2. Changed3 schema fields changed
    • addedOutput schema / $defs / SubtractTimeResponse
      Added value: +{
      +  "properties": {
      +    "code": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Code"
      +    },
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Error"
      +    },
      +    "original": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Original"
      +    },
      +    "result": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Result"
      +    },
      +    "subtracted": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/TimeDelta"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "title": "SubtractTimeResponse",
      +  "type": "object"
      +}
    • removedOutput schema / $defs / app__routers__datetime_utils__SubtractTimeResponse
      Removed value: -{
      -  "properties": {
      -    "code": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Code"
      -    },
      -    "error": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Error"
      -    },
      -    "original": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Original"
      -    },
      -    "result": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Result"
      -    },
      -    "subtracted": {
      -      "anyOf": [
      -        {
      -          "$ref": "#/$defs/TimeDelta"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    }
      -  },
      -  "title": "SubtractTimeResponse",
      -  "type": "object"
      -}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"app__routers__datetime_utils__SubtractTimeResponse"New value: +"SubtractTimeResponse"
  3. Changed3 schema fields changed
    • removedOutput schema / $defs / SubtractTimeResponse
      Removed value: -{
      -  "properties": {
      -    "code": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Code"
      -    },
      -    "error": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Error"
      -    },
      -    "original": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Original"
      -    },
      -    "result": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Result"
      -    },
      -    "subtracted": {
      -      "anyOf": [
      -        {
      -          "$ref": "#/$defs/TimeDelta"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    }
      -  },
      -  "title": "SubtractTimeResponse",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / app__routers__datetime_utils__SubtractTimeResponse
      Added value: +{
      +  "properties": {
      +    "code": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Code"
      +    },
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Error"
      +    },
      +    "original": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Original"
      +    },
      +    "result": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Result"
      +    },
      +    "subtracted": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/TimeDelta"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "title": "SubtractTimeResponse",
      +  "type": "object"
      +}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"SubtractTimeResponse"New value: +"app__routers__datetime_utils__SubtractTimeResponse"
  4. Changed3 schema fields changed
    • addedOutput schema / $defs / SubtractTimeResponse
      Added value: +{
      +  "properties": {
      +    "code": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Code"
      +    },
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Error"
      +    },
      +    "original": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Original"
      +    },
      +    "result": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Result"
      +    },
      +    "subtracted": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/TimeDelta"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "title": "SubtractTimeResponse",
      +  "type": "object"
      +}
    • removedOutput schema / $defs / app__routers__datetime_utils__SubtractTimeResponse
      Removed value: -{
      -  "properties": {
      -    "code": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Code"
      -    },
      -    "error": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Error"
      -    },
      -    "original": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Original"
      -    },
      -    "result": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Result"
      -    },
      -    "subtracted": {
      -      "anyOf": [
      -        {
      -          "$ref": "#/$defs/TimeDelta"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    }
      -  },
      -  "title": "SubtractTimeResponse",
      -  "type": "object"
      -}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"app__routers__datetime_utils__SubtractTimeResponse"New value: +"SubtractTimeResponse"
  5. Changed3 schema fields changed
    • removedOutput schema / $defs / SubtractTimeResponse
      Removed value: -{
      -  "properties": {
      -    "code": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Code"
      -    },
      -    "error": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Error"
      -    },
      -    "original": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Original"
      -    },
      -    "result": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Result"
      -    },
      -    "subtracted": {
      -      "anyOf": [
      -        {
      -          "$ref": "#/$defs/TimeDelta"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    }
      -  },
      -  "title": "SubtractTimeResponse",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / app__routers__datetime_utils__SubtractTimeResponse
      Added value: +{
      +  "properties": {
      +    "code": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Code"
      +    },
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Error"
      +    },
      +    "original": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Original"
      +    },
      +    "result": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Result"
      +    },
      +    "subtracted": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/TimeDelta"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "title": "SubtractTimeResponse",
      +  "type": "object"
      +}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"SubtractTimeResponse"New value: +"app__routers__datetime_utils__SubtractTimeResponse"
  6. Changed3 schema fields changed
    • addedOutput schema / $defs / SubtractTimeResponse
      Added value: +{
      +  "properties": {
      +    "code": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Code"
      +    },
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Error"
      +    },
      +    "original": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Original"
      +    },
      +    "result": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Result"
      +    },
      +    "subtracted": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/TimeDelta"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "title": "SubtractTimeResponse",
      +  "type": "object"
      +}
    • removedOutput schema / $defs / app__routers__datetime_utils__SubtractTimeResponse
      Removed value: -{
      -  "properties": {
      -    "code": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Code"
      -    },
      -    "error": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Error"
      -    },
      -    "original": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Original"
      -    },
      -    "result": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Result"
      -    },
      -    "subtracted": {
      -      "anyOf": [
      -        {
      -          "$ref": "#/$defs/TimeDelta"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    }
      -  },
      -  "title": "SubtractTimeResponse",
      -  "type": "object"
      -}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"app__routers__datetime_utils__SubtractTimeResponse"New value: +"SubtractTimeResponse"
  7. Changed3 schema fields changed
    • removedOutput schema / $defs / SubtractTimeResponse
      Removed value: -{
      -  "properties": {
      -    "code": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Code"
      -    },
      -    "error": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Error"
      -    },
      -    "original": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Original"
      -    },
      -    "result": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Result"
      -    },
      -    "subtracted": {
      -      "anyOf": [
      -        {
      -          "$ref": "#/$defs/TimeDelta"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    }
      -  },
      -  "title": "SubtractTimeResponse",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / app__routers__datetime_utils__SubtractTimeResponse
      Added value: +{
      +  "properties": {
      +    "code": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Code"
      +    },
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Error"
      +    },
      +    "original": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Original"
      +    },
      +    "result": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Result"
      +    },
      +    "subtracted": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/TimeDelta"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "title": "SubtractTimeResponse",
      +  "type": "object"
      +}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"SubtractTimeResponse"New value: +"app__routers__datetime_utils__SubtractTimeResponse"
  8. First observed

TDQS

C2.9/5.0
Behavior2/5

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

Without annotations, the description carries full burden, but only states 'Subtract time from a date.' It does not disclose whether the operation is destructive, whether it returns a new date or modifies the input, or any edge cases.

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?

Extremely concise at 4 words, front-loading the purpose. However, it could be slightly more informative without sacrificing brevity, such as mentioning the supported time units.

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

Completeness2/5

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

Despite having an output schema, the description is too minimal for a tool with six parameters. It does not explain how multiple units can be combined, that all optional parameters default to 0, or that the date must be in ISO format.

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 coverage is 100%, and each parameter has a clear description (e.g., 'Days to subtract'). The tool description adds no additional meaning beyond what the schema already provides, warranting the baseline score.

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 clearly states the verb 'subtract' and resource 'time from a date', which is specific and matches the tool's name. It distinguishes from sibling 'add_time' by implication, but does not explicitly differentiate from 'subtract_time_2'.

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?

No guidance on when to use this tool versus alternatives like 'add_time' or 'subtract_time_2'. No context on prerequisites, exclusions, or typical use cases is provided.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.