Skip to main content
Glama
edgedepthhq

EdgeDepth Research MCP Server

Official
by edgedepthhq

Run a cohort comparison study (record_occurrences)

run_cohort
Read-only

Execute a research query to compare treatment and baseline outcomes, returning canonical cohort results with multi-horizon summaries over all occurrences.

Instructions

Execute a research_query.v2 document as a predicate-complement comparison and return canonical cohort_result.v2 bytes: what followed the condition (the treatment side, byte-identical to the run_scan outcomes_summary for the same document) vs what followed every OTHER eligible bucket where the full predicate was FALSE (the baseline), each as the same 30m/1h/4h/24h return + MFE/MAE summary over ALL occurrences. WHERE-ONLY: a sequence document is refused with 422 COHORT_SEQUENCE_UNSUPPORTED (run it as an ordinary run_scan instead). The bytes carry NO ratios, lift, averages or significance - you compare the two distributions yourself. This is not covariate matching: treatment/baseline identities, different observation units, dedupe difference, and denominator arithmetic ship in the result with three mandatory caveats. Both sides honour the completeness rule: an occurrence closer to the end of recorded data than a horizon has that horizon ABSENT - quote present, not total, as the denominator. CONTRACT (relay to the user): Echo the exact document and the reproducibility key to the user with the result. Rates come from outcomes_summary over all occurrences; page rows are examples, never the denominator. Outcome fields cannot be filtered; expect OUTCOME_IN_PREDICATE if tried. A rerun of the same document is served from cache (X-Research-Cache: hit) in its own cohort namespace; reruns and 304 revalidations are free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentYesA complete research_query.v2 document (target record_occurrences, WHERE-ONLY - no sequence). Call list_features for the grammar; do not invent field names.
full_countsNoTrue returns the engine's verbatim canonical bytes, including any zero-count instrument in counts_by_symbol. Default omits zero-count entries when present.
if_none_matchNoAn ETag from a previous cohort run to revalidate: identical data answers 304 and spends nothing. Pass it back verbatim (it may be weak, W/"...").
Behavior5/5

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

Even though annotations declare readOnlyHint=true, the description adds substantial behavioral detail: exact byte output, absence of ratios/lift/averages, completeness rule, cache behavior with X-Research-Cache header, and mandatory caveats in the result. It also discloses error conditions like OUTCOME_IN_PREDICATE and the contract to echo document/key. No contradiction with annotations.

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 long but every sentence adds critical operational information, from return format to error handling to caching. It is front-loaded with the core purpose, then systematically adds caveats. The density is justified by the tool's complexity, and no sentence feels redundant.

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?

With no output schema, the description compensates by detailing the cohort_result.v2 bytes, time windows, MFE/MAE summary, and what is absent. It also covers error scenarios, contract requirements, and cache semantics, making the tool fully understandable. The description is complete given the tool's complexity.

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. The description enriches the document parameter by requiring WHERE-ONLY and explaining predicate-complement semantics, and clarifies if_none_match by describing ETag revalidation and 304 responses. Full_counts is not further elaborated in the description, but the schema description is already sufficient, so the added value is above baseline but not maximal.

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 executes a research_query.v2 document as a predicate-complement comparison, returning canonical cohort_result.v2 bytes with treatment vs baseline side-by-side. It explicitly names the alternative run_scan for sequence documents, distinguishing it from that sibling. The verb-resource-object structure is explicit and unambiguous.

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?

Explicitly instructs to use run_scan for sequence documents (WHERE-ONLY refusal with 422), provides a when-not for covariate matching, and warns against outcome field filtering. It also describes cache revalidation semantics for if_none_match, giving clear decision boundaries for when to invoke this tool.

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/edgedepthhq/edgedepth-research-mcp'

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