Skip to main content
Glama

search_kg

Search OpenAI Cookbook knowledge base using hybrid vector and knowledge graph retrieval. Get ranked passages with source references for API patterns, model comparisons, and code examples.

Instructions

Search the OpenAI Cookbook knowledge base using hybrid vector + KG-walk retrieval. Returns ranked passages with source references. Best for: API usage patterns, model comparisons, code examples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language question about the OpenAI API or Cookbook
top_kNoNumber of results to return (default: 5)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries full responsibility for behavioral disclosure. It mentions the retrieval mechanism and the return type, but it does not disclose any side effects, permissions, rate limits, error handling, or limitations. For a search operation this is likely read-only, but that is not explicitly confirmed, leaving a significant transparency gap.

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 concise and front-loaded with the core action. The second sentence efficiently provides usage context. No filler or redundant phrasing.

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?

With no output schema, the description should explain return values thoroughly. It states 'ranked passages with source references' but does not specify result structure, ranking details, or behavior when no results are found. The description is adequate for basic usage but leaves gaps an agent might need to handle.

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%, with both parameters (query and top_k) having clear descriptions. The tool description itself adds no additional parameter meaning, so it falls at the baseline of 3 for high schema coverage.

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 action (search), the resource (OpenAI Cookbook knowledge base), and the specific retrieval method (hybrid vector + KG-walk). It also indicates the output type (ranked passages with source references). This distinguishes it from siblings like get_doc or kg_stats by implying a general search over content, though it doesn't explicitly name them.

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 'Best for: API usage patterns, model comparisons, code examples' provides clear contextual guidance on when to use this tool. However, it does not explicitly state when not to use it or mention alternative tools, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools