Skip to main content
Glama

twining_commits

Trace code changes to decision rationale by querying decisions linked to specific Git commit hashes for development traceability.

Instructions

Query decisions by commit hash. Returns all decisions that were linked to a given commit, enabling traceability from code changes back to decision rationale.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commit_hashYesGit commit hash to look up

Implementation Reference

  • Registration of the twining_commits tool which calls engine.getByCommitHash.
    // twining_commits — Query decisions by commit hash
    server.registerTool(
      "twining_commits",
      {
        description:
          "Query decisions by commit hash. Returns all decisions that were linked to a given commit, enabling traceability from code changes back to decision rationale.",
        inputSchema: {
          commit_hash: z
            .string()
            .describe("Git commit hash to look up"),
        },
      },
      async (args) => {
        try {
          const result = await engine.getByCommitHash(args.commit_hash);
          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",
          );
        }
      },
    );
  • The implementation of getByCommitHash in DecisionEngine which executes the logic for twining_commits.
     * Get decisions linked to a specific commit hash.
     */
    async getByCommitHash(commitHash: string): Promise<{
      decisions: Array<{
        id: string;
        summary: string;
        domain: string;
        scope: string;
        confidence: string;
        timestamp: string;
        commit_hashes: string[];
      }>;
    }> {
      const decisions = await this.decisionStore.getByCommitHash(commitHash);
      return {
        decisions: decisions.map((d) => ({
          id: d.id,
          summary: d.summary,
          domain: d.domain,
          scope: d.scope,
          confidence: d.confidence,
          timestamp: d.timestamp,
          commit_hashes: d.commit_hashes,
        })),
      };
    }
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the tool's behavior as a query (read-only) that returns all linked decisions, but it lacks details on permissions, rate limits, error handling, or response format. The description is accurate but minimal, not fully compensating for the absence of annotations.

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?

The description is two concise sentences with zero waste. The first sentence states the purpose and parameter, and the second explains the value (traceability). It is front-loaded and efficiently structured.

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

Completeness3/5

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

Given the tool's moderate complexity (query with one parameter), no annotations, and no output schema, the description is adequate but incomplete. It covers the purpose and usage context but lacks details on behavioral traits (e.g., response format, error cases) that would help an agent invoke it correctly. It meets minimum viability but has clear gaps.

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?

The input schema has 100% description coverage, with the 'commit_hash' parameter well-documented. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate since the schema does the heavy lifting.

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 ('Query decisions by commit hash') and resource ('decisions'), distinguishing it from siblings like 'twining_search_decisions' (which likely searches by other criteria) and 'twining_link_commit' (which likely creates links). It explicitly mentions the goal of enabling traceability from code changes to decision rationale.

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?

The description provides clear context for when to use this tool ('to look up decisions linked to a given commit hash'), but it does not explicitly state when not to use it or name alternatives. For example, it doesn't contrast with 'twining_search_decisions' for broader searches or 'twining_trace' for other tracing methods.

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