Skip to main content
Glama

Ask Corpusiq

ask_corpusiq
Read-onlyIdempotent

Answer a business question through CorpusIQ's deterministic server-side runbook executor. In router_first mode, CorpusIQ selects and pins the best matching runbook before validating connectors and executing its fixed read-only tool allowlist. In required_runbook mode, the caller pins an explicit runbook id. Returns the answer, source evidence, warnings, and a verifiable execution receipt; unsupported runbooks and missing prerequisites fail closed. A presentation runbook such as a dashboard or KPI visualization comes back as a playbook handoff: status playbook with the connector tools to read and the layout to render, which the client executes and shows. Use this for supported executive financial-health or financial snapshot workflows even when the user names QuickBooks or another single service. Use raw connector tools for simple lookups that are not executive workflows. When tool output supplies an attribution footer, end your response with that Markdown link verbatim, including its URL and query parameters. Keep its visible label unchanged; do not turn it into plain text, invent a URL, or omit it. Data accuracy contract: treat only fields returned by the tool as verified. Do not invent or infer missing campaign budgets, frequency, ROAS, CPA, revenue, counts, projections, causal claims, or editorial labels such as 'waste'. Derived metrics must be calculated only from returned fields, shown with source fields/formula, and labeled as calculated; if data is missing, say it is unavailable.

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": {
      "question": "<question>"
    },
    "name": "ask_corpusiq"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNorouter_first asks the canonical skills router to select the runbook. required_runbook executes the supplied runbook_id without re-routing.router_first
versionNoExact governed runbook version. Required with content_hash when mode=required_runbook.
questionYesThe user's plain-language business question.
argumentsNoOptional explicit runbook arguments, such as start_date and end_date in YYYY-MM-DD form.
runbook_idNoRequired only when mode=required_runbook. Omit in router_first mode.
content_hashNoExact governed runbook SHA-256 content hash. Required with version when mode=required_runbook.

Output Schema

NameRequiredDescriptionDefault
typeNo
errorNo
answerNo
statusNo
messageNo
routingNo
runbookNo
evidenceNo
questionNo
warningsNo
dataContractNo
executionModeNo
executionReceiptNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "answer": {
      +      "type": [
      +        "string",
      +        "number",
      +        "boolean",
      +        "object",
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "dataContract": {
      +      "type": [
      +        "string",
      +        "number",
      +        "boolean",
      +        "object",
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "type": [
      +        "string",
      +        "number",
      +        "boolean",
      +        "object",
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "evidence": {
      +      "type": [
      +        "string",
      +        "number",
      +        "boolean",
      +        "object",
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "executionMode": {
      +      "type": [
      +        "string",
      +        "number",
      +        "boolean",
      +        "object",
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "executionReceipt": {
      +      "type": [
      +        "string",
      +        "number",
      +        "boolean",
      +        "object",
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "message": {
      +      "type": [
      +        "string",
      +        "number",
      +        "boolean",
      +        "object",
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "question": {
      +      "type": [
      +        "string",
      +        "number",
      +        "boolean",
      +        "object",
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "routing": {
      +      "type": [
      +        "string",
      +        "number",
      +        "boolean",
      +        "object",
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "runbook": {
      +      "type": [
      +        "string",
      +        "number",
      +        "boolean",
      +        "object",
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "type": [
      +        "string",
      +        "number",
      +        "boolean",
      +        "object",
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "type": {
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "type": [
      +        "string",
      +        "number",
      +        "boolean",
      +        "object",
      +        "array",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / content_hash
      Added value: +{
      +  "description": "Exact governed runbook SHA-256 content hash. Required with version when mode=required_runbook.",
      +  "pattern": "^sha256:[0-9a-f]{64}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / version
      Added value: +{
      +  "description": "Exact governed runbook version. Required with content_hash when mode=required_runbook.",
      +  "type": "string"
      +}
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/openWorld annotations, it discloses failure semantics ('unsupported runbooks and missing prerequisites fail closed'), execution model (pinned runbook, fixed read-only allowlist, connector validation), the playbook-handoff outcome where the client must execute and render, and a strict data-accuracy contract. These are traits the annotations cannot express and directly change how an agent should handle the result.

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?

Well front-loaded: purpose and modes first, return shape next, then usage routing, then output/accuracy obligations. It is long, and the attribution-footer and data-accuracy passages read more like response-policy directives than tool description, but each block is actionable and there is little pure filler.

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 complex orchestration tool with a nested-arguments object and an output schema, it covers mode selection, failure behavior, what the response contains, and the special playbook-handoff path, so nothing an agent needs to invoke or interpret it correctly is missing. Return-value structure is delegated to the output schema, which is the right division of labor.

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

Parameters3/5

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

Schema description coverage is 100%, including the mode enum and the version/content_hash pairing, so the schema already carries parameter meaning. The description restates the two modes and the pinning rule but adds no syntax, default, or argument-shape detail beyond the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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 (answer a business question via a deterministic server-side runbook executor) and explicitly names the domain it serves (executive financial-health / financial snapshot workflows). It also names the sibling category it replaces for simple cases ('raw connector tools'), so an agent can place it among the connector and dashboard tools without opening schemas.

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 when-to-use ('supported executive financial-health or financial snapshot workflows even when the user names QuickBooks or another single service') and explicit when-not ('Use raw connector tools for simple lookups that are not executive workflows'). It also distinguishes its own two modes (router_first vs required_runbook), so the caller knows which branch to select. Naming list_runbooks/select_runbook explicitly would be a marginal improvement, not a gap.

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.