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",
          );
        }
      },
    );
Behavior2/5

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

With no annotations provided, the description carries full burden but lacks behavioral details. It doesn't disclose whether this is a mutation (likely), permission requirements, side effects (e.g., if linking overwrites existing links), or error conditions (e.g., invalid IDs). The phrase 'enables bidirectional traceability' hints at outcome but not process.

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?

Two concise sentences with zero waste: the first states the action and resources, the second explains the purpose. It's front-loaded and efficiently structured.

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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavior, error handling, return values, and prerequisites, which are critical for an agent to use it correctly in context with many sibling tools.

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 description coverage is 100%, so parameters are well-documented in the schema. The description adds no additional meaning about parameters beyond implying they are used for linking. This meets the baseline of 3 when schema coverage is high.

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?

The description clearly states the specific action ('link'), the resources involved ('git commit hash' and 'existing decision'), and the purpose ('enables bidirectional traceability'). It distinguishes this tool from siblings like twining_commits or twining_decide by focusing on creating a relationship between them.

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. It doesn't mention prerequisites (e.g., decision must exist), exclusions, or compare it to similar tools like twining_add_relation, leaving the agent to infer usage context.

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

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