Skip to content
WeaversDocs
Browse documentation

Weavers / MCP documentation

Query research evidence

Explore owned runs and server-computed trial and trade distributions.

Read onlyquery_research

Required permission: weavers.experiments.read

Try asking

Count trials by state for this run.

How it works

  • Discover fields first. Guided trials require a stage; trade analysis is hindsight only.
  • Incomplete scans cannot be aggregated. Missing measurements are not zero. Queries additionally require weavers.strategies.read.
  • A content hash identifies the returned observations; it does not store an immutable historical dataset.

Inputs

FieldRequiredType & constraints
capabilityRequiredstring
runIdOptionalstring; at least 4 characters; up to 128 characters
strategyIdOptionalUUID string
reportIdOptionalUUID string
stageOptionalstring
periodOptionalstring
operationOptionalstring
filterFieldOptionalstring; up to 80 characters
filterValueOptionalstring; up to 200 characters or number or boolean or null
groupByOptionalstring; up to 80 characters
metricOptionalstring; up to 80 characters
limitOptionalinteger; minimum 1; maximum 100
cursorOptionalstring; up to 100 characters
View complete input JSON schema
Input schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "capability": {
      "type": "string",
      "enum": [
        "experiments",
        "configuration",
        "trials",
        "trades",
        "validation",
        "reports"
      ]
    },
    "runId": {
      "type": "string",
      "minLength": 4,
      "maxLength": 128
    },
    "strategyId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "reportId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "stage": {
      "type": "string",
      "enum": [
        "a",
        "a2",
        "b"
      ]
    },
    "period": {
      "type": "string",
      "enum": [
        "holdout",
        "validation"
      ]
    },
    "operation": {
      "type": "string",
      "enum": [
        "rows",
        "summary"
      ]
    },
    "filterField": {
      "type": "string",
      "maxLength": 80
    },
    "filterValue": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "groupBy": {
      "type": "string",
      "maxLength": 80
    },
    "metric": {
      "type": "string",
      "maxLength": 80
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "cursor": {
      "type": "string",
      "maxLength": 100
    }
  },
  "required": [
    "capability"
  ],
  "additionalProperties": false
}

What comes back

FieldDescription
items / evidenceBounded rows, computed summaries or exact recorded evidence.
coverage, snapshotId, observedAtCompleteness, content identity and retrieval time.
nextCursorContinuation bound to the same content; changed observations require a new query.

This table describes the decoded tool result. MCP wraps it in text content and, for object results, structuredContent.

Worked example

Fictional data. Replace identifiers, revisions and hashes with values from your own Weavers workflow.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "query_research",
    "arguments": {
      "capability": "trials",
      "runId": "33333333-3333-4333-8333-333333333333",
      "stage": "b",
      "operation": "summary",
      "groupBy": "state"
    }
  }
}
Decoded result

{
  "schema": "weavers.research.result.v1",
  "capability": "trials",
  "capabilityVersion": 1,
  "items": [
    {
      "group": "COMPLETE",
      "count": 20
    },
    {
      "group": "FAIL",
      "count": 2
    }
  ],
  "coverage": {
    "sourceComplete": true,
    "sampled": false
  },
  "nextCursor": null
}

If the request fails

  • Sign in and grant weavers.experiments.read before calling this tool.
  • Use resources you can access and refresh revision information when it changes.
  • Check result.isError even when HTTP returns 200.
Find the error and next step →