Skip to main content
Glama

search_semantic

Search a session's knowledge structure using natural language. Finds relevant seed objects via vector similarity, then expands their neighborhood to retrieve matching subgraphs.

Instructions

Semantically search the Knowledge Structure of a session. Provide a natural language query; if the storage backend has a vector index (embeddings generated via the background outbox worker), matching seed objects are found automatically. Pass explicit 'seed_ids' instead when you already know which objects to expand around, or as a fallback if no embeddings have been generated yet for this session. The tool expands the neighbourhood around the matched seeds using query_subgraph. Use this when you don't know exact object IDs but have a description of what you're looking for.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoHow many hops to expand around each seed (default 1).
queryYesNatural language description of what to find.
top_kNoMax number of seed objects to use (default 3).
seed_idsNoOptional. List of object IDs to start the subgraph expansion from. Omit to use vector search automatically; required as a fallback if the storage backend has no embeddings for this session yet.
min_scoreNoMinimum cosine similarity score (0.0 to 1.0). Results below this threshold are excluded. Default 0.0 (no filtering).
session_idYesThe session to search in.
Behavior4/5

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

With no annotations provided, the description carries the transparency burden. It explains the vector-index dependency, the background outbox worker, and the seed_ids fallback. It also mentions that the tool expands via query_subgraph. It does not disclose the return format or any side effects, but for a search tool this is acceptable.

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, front-loaded with purpose, and every sentence earns its place. It covers the action, the conditional behavior, and the when-to-use guidance without unnecessary verbosity.

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 6 parameters and no output schema, the description covers the key context: the search mechanism, the fallback, the expansion via query_subgraph, and the applicable use case. It does not describe the return format, but with no output schema and clear param details, this is a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds extra value by explaining the relationship between query and seed_ids, clarifying when each is appropriate, and noting the fallback behavior. This goes beyond the schema's individual parameter descriptions.

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 opens with a specific action: 'Semantically search the Knowledge Structure of a session.' It clearly distinguishes from siblings by explaining that it uses natural language queries instead of exact IDs and mentions query_subgraph as an internal helper. The resource and scope are well-defined.

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?

Explicit when-to-use guidance: 'Use this when you don't know exact object IDs but have a description of what you're looking for.' It also explains when to pass seed_ids instead, covering both the primary and fallback scenarios. This makes the usage context unambiguous.

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/Deus-corp/cks-mcp'

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