Skip to main content
Glama

twining_override

Override a decision by providing a reason, recording who made the change, and optionally creating a replacement decision automatically.

Instructions

Override a decision with a reason. Sets the decision to overridden status, records who overrode it and why, and optionally creates a replacement decision automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
decision_idYesID of the decision to override
reasonYesReason for the override
new_decisionNoSummary of the replacement decision to auto-create
overridden_byNoWho is overriding (default: "human")

Implementation Reference

  • Registration of the 'twining_override' tool within the server.
    server.registerTool(
      "twining_override",
      {
        description:
          "Override a decision with a reason. Sets the decision to overridden status, records who overrode it and why, and optionally creates a replacement decision automatically.",
        inputSchema: {
          decision_id: z.string().describe("ID of the decision to override"),
          reason: z.string().describe("Reason for the override"),
          new_decision: z
            .string()
            .optional()
            .describe("Summary of the replacement decision to auto-create"),
          overridden_by: z
            .string()
            .optional()
            .describe('Who is overriding (default: "human")'),
        },
      },
      async (args) => {
  • The core logic of the 'twining_override' tool is implemented in the 'override' method of the Decisions engine.
    async override(
      decisionId: string,
      reason: string,
      newDecision?: string,
      overriddenBy?: string,
    ): Promise<{
      overridden: boolean;
      old_summary: string;
      new_decision_id?: string;
    }> {
      const decision = await this.decisionStore.get(decisionId);
      if (!decision) {
        throw new TwiningError(
          `Decision not found: ${decisionId}`,
          "NOT_FOUND",
        );
      }
    
      // Set status to overridden with extra fields
      await this.decisionStore.updateStatus(decisionId, "overridden", {
        overridden_by: overriddenBy ?? "human",
        override_reason: reason,
      });
    
      // Post override entry to blackboard (internal — bypasses decision rejection)
      const overrider = overriddenBy ?? "human";
      await this.blackboardEngine.post({
        entry_type: "decision",
        summary:
          `Override: ${decision.summary} -- overridden by ${overrider}`.slice(
            0,
            200,
          ),
        detail: reason,
        tags: [decision.domain],
        scope: decision.scope,
        agent_id: overrider,
        _internal: true,
      });

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/daveangulo/twining-mcp'

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