Skip to main content
Glama

twining_search_decisions

Search decisions by keyword or semantic similarity across all scopes. Filter results by domain, status, and confidence level to find relevant project decisions.

Instructions

Search decisions across all scopes by keyword or semantic similarity. Returns ranked results without requiring a specific scope. Supports filtering by domain, status, and confidence level.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query — keywords or natural language description of what you're looking for
domainNoFilter by decision domain (e.g., 'architecture', 'implementation')
statusNoFilter by decision status
confidenceNoFilter by confidence level
limitNoMaximum results to return (default: 20)

Implementation Reference

  • Registration and handler for "twining_search_decisions" which delegates to engine.searchDecisions.
    // twining_search_decisions — Search decisions across all scopes
    server.registerTool(
      "twining_search_decisions",
      {
        description:
          "Search decisions across all scopes by keyword or semantic similarity. Returns ranked results without requiring a specific scope. Supports filtering by domain, status, and confidence level.",
        inputSchema: {
          query: z
            .string()
            .describe(
              "Search query — keywords or natural language description of what you're looking for",
            ),
          domain: z
            .string()
            .optional()
            .describe(
              "Filter by decision domain (e.g., 'architecture', 'implementation')",
            ),
          status: z
            .enum(["active", "provisional", "superseded", "overridden"])
            .optional()
            .describe("Filter by decision status"),
          confidence: z
            .enum(["high", "medium", "low"])
            .optional()
            .describe("Filter by confidence level"),
          limit: z
            .number()
            .optional()
            .describe("Maximum results to return (default: 20)"),
        },
      },
      async (args) => {
        try {
          const filters: {
            domain?: string;
            status?: "active" | "provisional" | "superseded" | "overridden";
            confidence?: "high" | "medium" | "low";
          } = {};
          if (args.domain) filters.domain = args.domain;
          if (args.status) filters.status = args.status;
          if (args.confidence) filters.confidence = args.confidence;
    
          const result = await engine.searchDecisions(
            args.query,
            Object.keys(filters).length > 0 ? filters : undefined,
            args.limit,
          );
          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?

No annotations are provided, so the description carries the full burden. It mentions the tool returns 'ranked results' and supports filtering, but lacks details on behavioral traits like pagination, rate limits, authentication needs, error handling, or what 'semantic similarity' entails. This is a significant gap for a search tool with no annotation coverage.

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 efficiently structured in two sentences, front-loaded with the core purpose and followed by key features. There's no wasted text, though it could be slightly more detailed given the lack of annotations.

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?

Given the complexity of a search tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain the return format, ranking criteria, or behavioral aspects like performance or limitations, leaving gaps for an AI agent to use it effectively.

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 value beyond the schema by mentioning filtering by domain, status, and confidence level, but doesn't provide additional semantics like examples or constraints not in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches decisions across all scopes using keyword or semantic similarity, which is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'twining_query' or 'twining_discover', which might have overlapping functionality.

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 by mentioning it searches 'across all scopes' and 'without requiring a specific scope', suggesting this is for broad searches. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'twining_query' or 'twining_discover', nor does it mention when not to use it.

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