Skip to main content
Glama

twining_query

Search blackboard entries using semantic or keyword queries to find relevant information for development tasks.

Instructions

Semantic search across blackboard entries. Uses embeddings when available, falls back to keyword search. Returns entries ranked by relevance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language query
entry_typesNoOptional type filter
limitNoMax results (default: 10)

Implementation Reference

  • The tool 'twining_query' is registered here. It calls 'engine.query' to perform the actual logic.
    // twining_query — Semantic search across blackboard entries
    server.registerTool(
      "twining_query",
      {
        description:
          "Semantic search across blackboard entries. Uses embeddings when available, falls back to keyword search. Returns entries ranked by relevance.",
        inputSchema: {
          query: z.string().describe("Natural language query"),
          entry_types: z
            .array(z.string())
            .optional()
            .describe("Optional type filter"),
          limit: z
            .number()
            .optional()
            .describe("Max results (default: 10)"),
        },
      },
      async (args) => {
        try {
          const result = await engine.query(args.query, {
            entry_types: args.entry_types,
            limit: args.limit,
          });
          return toolResult(result);
        } catch (e) {
          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 full burden. It discloses the search mechanism (embeddings with keyword fallback) and ranking behavior, which is valuable. However, it lacks critical behavioral details: whether this is read-only or has side effects, authentication requirements, rate limits, error conditions, or pagination handling. For a search tool with no annotations, this leaves significant gaps.

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 a single, well-structured sentence that efficiently conveys purpose, mechanism, and outcome with zero wasted words. It's front-loaded with the core function and appropriately sized for the tool's complexity.

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 no annotations and no output schema, the description is moderately complete. It covers the search behavior and ranking but omits details on return format, error handling, and side effects. For a search tool with 3 parameters and 100% schema coverage, it's adequate but leaves the agent to guess about output structure and operational constraints.

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 fully documents parameters. The description adds no parameter-specific semantics beyond implying the 'query' is for semantic search. It doesn't explain 'entry_types' options or 'limit' constraints further. 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.

Purpose4/5

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

The description clearly states the tool performs 'semantic search across blackboard entries' with a specific mechanism (embeddings fallback to keyword) and outcome (returns ranked entries). It distinguishes from obvious siblings like 'twining_search_decisions' by focusing on general entries rather than decisions specifically. However, it doesn't explicitly differentiate from 'twining_graph_query' or other search-related tools in the sibling list.

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 like 'twining_search_decisions', 'twining_graph_query', or 'twining_recent'. It mentions the search mechanism but doesn't specify use cases, prerequisites, or exclusions. The agent must infer usage from the tool name and description alone.

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