Skip to main content
Glama

twining_verify

Run verification checks on development scopes to validate test coverage, warnings, assembly tracking, and drift detection. Automatically posts findings with summaries.

Instructions

Run verification checks on a scope. Checks test coverage (tested_by relations), warnings acknowledgment, assembly-before-decision tracking, drift detection (P2 stub), and constraints (P2 stub). Auto-posts a finding with the summary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeYesScope to verify (e.g., "src/auth/" or "project")
checksNoSpecific checks to run (default: all). Options: test_coverage, warnings, drift, assembly, constraints
agent_idNoFilter assembly check to a specific agent (default: all agents)
fail_onNoCheck names that should cause a failure status if they don't pass

Implementation Reference

  • Tool handler implementation for 'twining_verify', which calls VerifyEngine.verify().
    async (args) => {
      try {
        const result = await verifyEngine.verify({
          scope: args.scope,
          checks: args.checks,
          agent_id: args.agent_id,
          fail_on: args.fail_on,
        });
        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 core business logic of the 'twining_verify' tool, which orchestrates various checks (coverage, warnings, assembly, drift, constraints).
    async verify(input: {
      scope: string;
      checks?: string[];
      agent_id?: string;
      fail_on?: string[];
    }): Promise<VerifyResult> {
      const checksToRun: Set<CheckName> = new Set(
        input.checks
          ? (input.checks.filter((c) =>
              ALL_CHECKS.includes(c as CheckName),
            ) as CheckName[])
          : [...ALL_CHECKS],
      );
    
      const result: VerifyResult = {
        scope: input.scope,
        verified_at: new Date().toISOString(),
        checks: {},
        summary: "",
      };
    
      // Load decisions in scope
      const allDecisions = await this.decisionStore.getByScope(input.scope);
      const activeDecisions = allDecisions.filter(
        (d) => d.status === "active" || d.status === "provisional",
      );
    
      if (checksToRun.has("test_coverage")) {
        result.checks.test_coverage = await this.checkTestCoverage(activeDecisions);
      }
    
      if (checksToRun.has("warnings")) {
        result.checks.warnings = await this.checkWarnings(input.scope);
      }
    
      if (checksToRun.has("assembly")) {
        result.checks.assembly = this.checkAssembly(activeDecisions, input.agent_id);
      }
    
      if (checksToRun.has("drift")) {
        result.checks.drift = await this.checkDrift(activeDecisions, input.scope);
      }
    
      if (checksToRun.has("constraints")) {
        result.checks.constraints = await this.checkConstraints(input.scope);
      }
    
      // Build summary
      const parts: string[] = [];
      for (const [name, check] of Object.entries(result.checks)) {
        if (check) {
          parts.push(`${name}: ${check.status}`);
        }
      }
      result.summary = parts.join(", ");
    
      // Auto-post finding
      try {
        await this.blackboardEngine.post({
          entry_type: "finding",
          summary: `Verification: ${result.summary}`,
          detail: JSON.stringify(result.checks, null, 2),
          tags: ["verify"],
          scope: input.scope,
          agent_id: input.agent_id ?? "verify-engine",
        });
      } catch {
        // Non-fatal — verification result is still returned
      }
    
      return result;
    }
  • Registration of the 'twining_verify' tool within the MCP server.
    "twining_verify",
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it runs multiple checks (test coverage, warnings, etc.), includes drift and constraints as 'P2 stub' (impending features), and auto-posts a finding with a summary. This covers mutation aspects (posting) and scope, though it could add more on permissions or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the core action ('Run verification checks on a scope') and listing checks efficiently. Every sentence adds value, though it could be slightly more structured by separating behavioral details into distinct points.

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

Completeness4/5

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

Given the complexity (4 parameters, no annotations, no output schema), the description is fairly complete. It explains what the tool does, the checks involved, and the auto-posting behavior. However, it lacks details on output format or error responses, which would enhance completeness for a tool with mutation aspects and no output schema.

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 the schema already documents all parameters thoroughly. The description adds minimal param semantics by mentioning checks like 'drift detection (P2 stub)' and 'constraints (P2 stub)', which align with the 'checks' parameter enum but don't provide extra syntax or format details. Baseline 3 is appropriate as 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 tool's purpose with specific verbs ('Run verification checks') and resources ('on a scope'), and it distinguishes itself from siblings by focusing on verification rather than operations like acknowledge, add, assemble, or query. It lists the specific checks performed, making the purpose explicit and distinct.

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

Usage Guidelines3/5

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

The description implies usage for verification tasks but does not explicitly state when to use this tool versus alternatives like twining_status or twining_query. It mentions auto-posting a finding, which hints at a reporting context, but lacks clear guidance on prerequisites, exclusions, or named alternatives among siblings.

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