Skip to main content
Glama

twining_link_commit

Link git commit hashes to decisions for bidirectional traceability between code changes and documented rationale.

Instructions

Link a git commit hash to an existing decision. Enables bidirectional traceability between decisions and commits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
decision_idYesID of the decision to link
commit_hashYesGit commit hash to link
agent_idNoID of the agent performing the link

Implementation Reference

  • Registration and handler implementation of the "twining_link_commit" tool within the `registerDecisionTools` function. It calls the engine's `linkCommit` method.
    // twining_link_commit — Link a git commit hash to an existing decision
    server.registerTool(
      "twining_link_commit",
      {
        description:
          "Link a git commit hash to an existing decision. Enables bidirectional traceability between decisions and commits.",
        inputSchema: {
          decision_id: z.string().describe("ID of the decision to link"),
          commit_hash: z.string().describe("Git commit hash to link"),
          agent_id: z
            .string()
            .optional()
            .describe("ID of the agent performing the link"),
        },
      },
      async (args) => {
        try {
          const result = await engine.linkCommit(
            args.decision_id,
            args.commit_hash,
            args.agent_id,
          );
          return toolResult(result);
        } catch (e) {
          if (e instanceof TwiningError) {
            return toolError(e.message, e.code);
          }
          return toolError(
            e instanceof Error ? e.message : "Unknown error",
            "INTERNAL_ERROR",
          );
        }
      },
    );

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