Skip to main content
Glama

query_knowledge

Read-onlyIdempotent

Explain trading concepts, definitions, relationships, comparisons and when signals work or fail using Michael's knowledge graph. This is the first tool for a general knowledge question, including which indicators complement RSI and when to avoid combining them. Start with op=ask, the complete question in q, hops=1 and limit=5. Keep related clauses together; do not run a search for each clause. Read the summaries and edge reasons before deciding on another call. Answer once the requested explanation and cautions are supported. A follow-up must address a specific missing fact: get an already-returned node for its details, or read one relevant KB section. Do not gather extra context, enumerate neighbors, check the signal catalogue or measure signals merely to expand a conceptual answer. If evidence remains insufficient, say what is unknown instead of repeatedly rephrasing searches. This guidance does not replace validation required for an actual strategy or a requested graph exploration. Explicit glossary, document and browsing requests go directly to the corresponding KB tool without a preliminary graph call. Runtime signal selection belongs to the signal catalogue; measured firing rates and durations belong to query_signal_behavior; current market regime belongs to get_market_regime. These are separate user intents, not mandatory steps for an explanation. Mangrove product policy belongs to query_product_facts. Reuse evidence and node IDs already returned in this conversation. Ops: stats (the counts and the complete vocabulary every filter accepts -- call it when you do not already know the filter values), find (search BY WORDS, optionally by kind/role/status/requires/param -- param finds every signal taking a parameter of that name), ask (search BY MEANING -- give it the question in ordinary words; use this when you would otherwise answer from memory, e.g. 'how far should the stop go', 'what works in a sideways market'; hops is capped at 3), get (one node in full: formula, inputs, params, outputs, warmup), neighbors (one hop: what reads this, or what this depends on; filter by relation, relation_category, primitive or why), walk (the whole neighbourhood out to a radius, as nodes plus edges -- for 'everything around X' rather than one hop at a time), outputs (search the VALUES: which are bounded, which are in given units, what produces an output called X), path (the one shortest route between two nodes), paths (every simple route between two nodes -- use when the shortest route is not the explanatory one), ancestors (the classes a node belongs to, transitively), descendants (everything under a class, transitively), under (everything contained in a node by subject, whatever primitive it is -- e.g. a whole knowledge-base chapter). NEVER GUESS a node id or name for get/neighbors/outputs/path/walk/paths/ancestors/descendants/under: call find (or ask) only if you do not already have an ID from a tool result -- ids look like 'procedure:signal-rsi-bullish-divergence', not 'rsi_divergence'. A get that misses returns candidates; fetch one only if it is relevant to a fact still needed for the answer. Signal rows carry signal_type from the catalog: TRIGGER is an occurrence, FILTER is a condition that can remain true across bars. A boolean output does not make a signal a TRIGGER; read its signal_type rather than infer its role from its name or output. Class and role are different questions: kind='momentum' is what a computation measures, role='trigger' is the part it plays.

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": {
      "op": "<op>"
    },
    "name": "query_knowledge"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoThe search text, in ordinary words.
opYesWhich question you are asking.
toNopath, paths: the destination node.
whyNoneighbors, walk, ask: keep only edges whose own stated reason matches these words -- the same relation can carry different claims.
hopsNoask: how far to walk from each match. 0 restricts it to retrieval. Capped at 3; a higher value raises ValueError naming the cap.
kindNoThe class: what a computation measures.
roleNoThe part a signal plays in a strategy.
limitNoMaximum results.
paramNofind: a parameter name -- every signal that takes it.
seedsNoask: how many top matches to expand from before re-ranking.
unitsNoThe unit an output is measured in.
radiusNowalk: how many hops out the neighbourhood reaches. Capped at 3; for anything wider call neighbors or path instead of a bigger radius.
statusNoWhether the thing is current or withdrawn.
boundedNooutputs: only values with a fixed range.
relationNoneighbors: follow only this one relation.
requiresNoAn input column it needs.
directionNoneighbors: in = what reads this, out = what this depends on.both
max_depthNopath, paths: how long a route may be. path defaults to 6; paths defaults to 4 and is capped at 4 -- past that almost every extra route is a detour through a hub rather than an explanation.
max_nodesNowalk: stop expanding once this many nodes are collected.
primitiveNoneighbors: keep only neighbours of this node primitive, e.g. Procedure or Concept.
relationsNopath, paths, ask: follow only these relations.
sibling_hopsNopaths: include routes that pass through a shared parent (both nodes are, say, Signal) rather than a direct connection. Off by default -- those routes are usually not the explanation.
relation_categoryNoneighbors: follow only edges of this whole relation category (structural, descriptive, associative, meta) -- see stats for the list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The description goes far beyond the read-only annotations by explaining retrieval behavior, node ID requirements, get-miss candidate behavior, signal_type semantics, hop caps, and when evidence is sufficient to answer. These details materially reduce incorrect calls and over-querying.

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 description is long and dense, but the tool has 12 operations and 23 parameters, so most content is justified. The purpose and starting instructions are front-loaded, though the long single paragraph and repeated usage cautions reduce readability slightly.

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?

Given the complex polymorphic schema and lack of an output schema, the description is complete enough: it explains operation meanings, expected return concepts, node ID conventions, and when to stop. The annotations already cover safety, and the description supplies the behavioral and usage context an agent needs.

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?

Although the schema already documents all 23 parameters, the description adds essential semantics for the polymorphic op parameter: find searches by words, ask searches by meaning, get fetches one node, walk expands a neighborhood, and paths differ from path. It also explains practical parameter interactions, caps, and defaults that are not fully conveyed by the schema alone.

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 gives a specific verb and resource: explain trading concepts, definitions, relationships, comparisons, and signal behavior from Michael's knowledge graph. It also distinguishes this from sibling tools such as kb_glossary_get, kb_search, query_signal_behavior, get_market_regime, and query_product_facts.

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?

It explicitly says when to use this tool first for general knowledge questions and how to start with op=ask, q, hops=1, and limit=5. It also names alternatives for separate intents and gives clear stop/answer/follow-up conditions, including avoiding unnecessary searches or context gathering.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.