Skip to main content
Glama

semantic_search

Search for nodes in a codebase knowledge graph by substring matching of node names. Supports filtering by domain and limiting results.

Instructions

Substring search across knowledge-graph node names (case-insensitive).

NOTE: despite the name, embedding-based semantic ranking is not wired yet (RFD-63). This currently matches substrings of node names — results are plain matches, not similarity-ranked. Use recall for broader retrieval.

Example: semantic_search(query="auth token", top_k=5, domain="devops")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language search query
top_kNoMaximum number of results to return (default: 10)
domainNoFilter results to a specific domain
Behavior5/5

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

With no annotations, the description fully discloses behavior: it's a substring match (not semantic), case-insensitive, returns plain matches, and has a known limitation (RFD-63). This transparency helps the agent set correct expectations.

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?

Three sentences: main purpose, limitation note, example. Front-loaded with key information, no redundancy, concise yet complete.

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?

For a simple search tool with no output schema, the description covers behavioral aspects well. However, it lacks details about the return format (e.g., what fields are returned). An example partially compensates, but a bit more on output structure would improve completeness.

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?

Input schema covers all 3 parameters with descriptions (100% coverage). The description adds an example with usage but does not enrich the semantics beyond the schema. Baseline 3 is appropriate.

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 it performs case-insensitive substring search on knowledge-graph node names, distinguishing it from embedding-based semantic search. The verb 'search' and resource 'node names' are specific, and the note about RFD-63 clarifies its current limitations.

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

Usage Guidelines5/5

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

The description explicitly says when to use it ('substring search across node names') and when not ('not embedding-based', advises to use 'recall' for broader retrieval). It also clarifies that results are plain matches, not similarity-ranked.

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/Disentinel/grafema'

If you have feedback or need assistance with the MCP directory API, please join our Discord server