Skip to main content
Glama

cos_graph_similar

Read-onlyIdempotent

Find similar nodes in the knowledge graph by providing a node UID. Set top-K and confidence threshold to retrieve ranked matches.

Instructions

Return the top-K nodes most similar to uid (difflib baseline).

Args: uid: Fully-qualified node uid (see cos_graph_impact for scheme). Raw repo paths are auto-resolved to code:file: / doc:file: / folder:. top_k: Number of similar nodes to return. confidence_min: Minimum similarity score (0.0–1.0).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYes
top_kNo
confidence_minNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description builds on that by adding concrete behavior: difflib baseline, auto-resolution of raw repo paths to code:file:/doc:file:/folder: namespaces, and a confidence threshold. This exceeds the structured hints without contradicting them, though it does not detail output shape or error cases.

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 tight docstring with a one-sentence purpose followed by structured, scannable argument definitions. Every sentence adds value and there is no filler or redundancy.

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 the rich annotations and existing output schema, the description covers input semantics and safety sufficiently. The main gap is lack of mention of behavior when uid is not found or confidence_min is outside bounds, but the tool is still well-positioned for correct selection and invocation.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden for parameter meaning. It defines uid as fully-qualified with auto-resolution, top_k as the number of similar nodes, and confidence_min as a 0.0–1.0 similarity threshold. This adds substantial semantics beyond the bare schema names.

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: 'Return the top-K nodes most similar to `uid`', naming the resource (nodes), the operation (similarity retrieval), and the algorithm (difflib baseline). This clearly distinguishes it from sibling graph tools like cos_graph_search or cos_graph_context.

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 how to call the tool (uid resolution, top_k, confidence_min) but gives no explicit guidance on when to use this tool versus alternatives. The only cross-reference, 'see cos_graph_impact for scheme', is about UID format, not usage selection or exclusions.

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/kouroshez/coding-os'

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