Skip to main content
Glama

Roll a function back to a saved version

dosai_restore_function_version
Destructive

Return a function to one of its saved versions (ids: dosai_list_function_versions). The current state is saved as a new version first, so the rollback can itself be rolled back. The on/off switch is rolled back too: a function that is off now comes back ON if it was on in that version, so check is_active with dosai_get_function afterwards. Saved keys and passwords are not part of a version and stay as they are now. Requires editor role.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_id": "<project_id>",
      "function_id": "<function_id>",
      "version_id": "<version_id>"
    },
    "name": "dosai_restore_function_version"
  }
}

Input Schema

NameRequiredDescriptionDefault
project_idYesFrom dosai_list_projects.
version_idYes
function_idYesFrom dosai_list_functions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / function_id / description
      Previous value: -"Function id, as returned by dosai_list_functions."New value: +"From dosai_list_functions."
  2. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • changedInput schema / properties / project_id / description
      Previous value: -"Project id, as returned by dosai_list_projects."New value: +"From dosai_list_projects."
  3. Changed3 schema fields changed
    • removedInput schema / properties / function_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • removedInput schema / properties / project_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • removedInput schema / properties / version_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  4. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the destructiveHint/readOnlyHint annotations: it discloses that the current state is snapshotted first so the rollback is itself reversible, that the active on/off flag is also rolled back (a surprising side effect), that secrets are excluded and preserved as-is, and that editor role is required. These are exactly the behavioral facts an agent needs to avoid an unintended outage.

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?

Front-loads the action in the first clause, then layers consequences in descending order of risk (reversibility, active-flag side effect, preserved secrets, permissions). No filler sentences and no restatement of the title or annotations.

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

Completeness5/5

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

With no output schema and a destructive mutation, the description carries what's needed: reversibility, secondary state changes, excluded data, permission requirement, and a recommended verification step. Nothing an agent needs to call this safely is missing.

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

Parameters5/5

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

Schema coverage is 67% and the undocumented parameter is version_id, which the description compensates for by explaining versions are obtained from dosai_list_function_versions. It also reinforces project_id/function_id provenance implicitly by naming the version source. Meaning is added where the schema is silent.

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?

States a specific verb and resource ('Return a function to one of its saved versions') and immediately disambiguates from the sibling that shares its noun space by naming dosai_list_function_versions as the source of version ids. An agent can tell this apart from dosai_update_function or dosai_set_function_active without opening any schema.

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

Usage Guidelines4/5

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

Gives clear usage context: it names the prerequisite tool for obtaining version ids and prescribes a follow-up check ('check is_active with dosai_get_function afterwards'). It does not explicitly exclude cases (e.g., 'use dosai_update_function instead if you only want to change settings on the current version'), so it falls just short of a full when/when-not statement.

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.

Resources