Skip to main content
Glama

semantic_search_subgraphs

Find subgraphs by natural-language use case using vector similarity, ranking registry entries by description, entities, and protocol metadata.

Instructions

Discovery only — this tool does not execute GraphQL and never introspects a schema. To run a query, call execute_query (opt-in). To inspect a schema, call get_schema (opt-in). Semantic vector search over the subgraph registry. Embeds the query string with sentence-transformers/all-MiniLM-L6-v2 (the same model architecture used at crawl time; the runtime uses an INT8-quantized ONNX build so absolute scores can drift ~0.01-0.03 from the float32 reference but top-K rankings are stable) and ranks subgraphs by cosine similarity against the precomputed 384-dim embedding of each subgraph's description + entities + protocol metadata. Prefer this over search_subgraphs when the goal is fuzzy, paraphrased, or describes a use-case rather than a literal protocol/entity name. Supports the same domain/network/protocol_type/min_reliability pre-filters as search_subgraphs (applied as SQL WHERE before cosine scoring for performance). Returns the same shape as search_subgraphs plus a semantic_score in [0,1] (>0.5 is typically a strong match).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "semantic_search_subgraphs"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results to return (default 10, max 50)
queryYesNatural-language description of the data the agent wants to query, e.g. 'on-chain options market activity' or 'lending positions near liquidation'
domainNoPre-filter by domain (defi, nfts, dao, gaming, identity, infrastructure, social, analytics)
networkNoPre-filter by chain (mainnet, arbitrum-one, base, matic, bsc, optimism, avalanche, etc.)
min_scoreNoMinimum cosine similarity to include (0-1). Default 0.3.
protocol_typeNoPre-filter by protocol type (dex, lending, bridge, staking, options, perpetuals, etc.)
include_deniedNoInclude curation-denied deployments (deniedAt > 0 — denied indexing rewards; not proof of spam or query failure). Default false. When true, each result carries denied: true so the choice stays visible.
min_reliabilityNoPre-filter: minimum reliability score (0-1).
include_testnetsNoInclude testnet deployments (sepolia, goerli, holesky, chapel, fuji, mumbai, amoy, *-testnet). Default false — a testnet twin's text is near-identical to its mainnet original, so it competes for the top slot without being the thing anyone wanted. Ignored when you explicitly request a testnet network, so network:"sepolia" still works. Each result carries testnet: true|false.
include_unservedNoInclude records with zero active allocations in the registry snapshot. Default false is a discovery heuristic, NOT a queryability test; Studio or other serving routes may work without allocations.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.13.7

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does: it discloses that it is discovery-only and non-executing, names the embedding model, warns that INT8 quantization can shift absolute scores by ~0.01-0.03 while top-K stays stable, and explains that pre-filters are applied as SQL WHERE before cosine scoring. It also describes the return payload (same shape as search_subgraphs plus semantic_score) and how to read that score.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The most decision-relevant fact — discovery only, does not execute — is front-loaded, and the rest follows in a logical order from routing to mechanics to return shape. It runs long and the INT8-versus-float32 drift aside is more detail than most callers need, keeping it short of a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter tool with no annotations and no output schema, the description covers what is missing elsewhere: the return shape, score interpretation, filter evaluation order, and the non-executing nature of the tool. An agent has everything needed to select it and read its results without opening other definitions.

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 coverage is 100%, so baseline is 3, but the description adds real meaning beyond it: it clarifies that domain/network/protocol_type/min_reliability act as pre-filters executed before cosine scoring (a performance and semantics detail absent from the schema) and that semantic_score above 0.5 is typically a strong match. It does not, however, individually explain the include_denied/include_unserved toggles.

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?

States a specific verb and resource — semantic vector search over the subgraph registry — and immediately disambiguates it from siblings by declaring it does not execute GraphQL or introspect schemas. It also names the exact sibling it should replace (search_subgraphs) plus the two tools that handle the other tasks.

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?

Gives explicit routing: call execute_query to run a query, get_schema to inspect a schema, and prefer this tool over search_subgraphs when the goal is fuzzy, paraphrased, or use-case-shaped rather than a literal name. That is both when-to-use and when-not-to-use with named alternatives.

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