Skip to main content
Glama

Get the extraction prompt pack

dsail_get_prompt_pack
Idempotent

Get the exact questions to ask a document so the answers can be checked against a written policy.

Use when reviewers pull different facts from the same kind of document, or the caller needs a consistent set of questions before applying decided rules.

Returns the extraction contract for a compiled ruleset: one prompt per claim (question, answer format, vocabulary, unit), the claim JSON schema, and the exact validation rules a check enforces. The prompts are for the caller's own model to run; this service calls no model. The assembled claim dictionary is what a check takes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNoDSAIL source text, byte for byte as compiled. Give this OR `ruleset_hash`; prefer the hash for anything already compiled.
ruleset_hashNoThe content hash of an already compiled ruleset (from `dsail_compile` or a saved name). Give this OR `source`, not both.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / oneOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "assembly_notes": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "claim_schema": {
      -        "type": "object"
      -      },
      -      "integrity_rule": {
      -        "type": "string"
      -      },
      -      "ok": {
      -        "const": true,
      -        "type": "boolean"
      -      },
      -      "prompts": {
      -        "items": {
      -          "properties": {
      -            "answer_format": {
      -              "type": "string"
      -            },
      -            "claim": {
      -              "type": "string"
      -            },
      -            "context": {
      -              "type": "string"
      -            },
      -            "data_type": {
      -              "type": "string"
      -            },
      -            "ordered_vocabulary": {
      -              "description": "True when the enum was declared ordered, so its members compare with < and >.",
      -              "type": "boolean"
      -            },
      -            "question": {
      -              "type": "string"
      -            },
      -            "range": {
      -              "type": "object"
      -            },
      -            "undetermined_value": {
      -              "description": "The literal to send when this claim could not be determined: \"unknown\", or null where the vocabulary itself contains \"unknown\".",
      -              "type": "string"
      -            },
      -            "unit": {
      -              "type": "string"
      -            },
      -            "unknown_rule": {
      -              "type": "string"
      -            },
      -            "vocabulary": {
      -              "items": {
      -                "type": "string"
      -              },
      -              "type": "array"
      -            }
      -          },
      -          "required": [
      -            "claim",
      -            "data_type",
      -            "question",
      -            "answer_format",
      -            "unknown_rule"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "ruleset_hash": {
      -        "type": "string"
      -      },
      -      "validation_contract": {
      -        "type": "object"
      -      },
      -      "versions": {
      -        "description": "Which engine and which wire contract produced this response.",
      -        "properties": {
      -          "engine": {
      -            "example": "dsail-core",
      -            "type": "string"
      -          },
      -          "engine_version": {
      -            "type": "string"
      -          },
      -          "language_version": {
      -            "description": "DSAIL language version.",
      -            "type": "string"
      -          },
      -          "service_version": {
      -            "type": "string"
      -          },
      -          "supported_language_versions": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "wire_version": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "engine",
      -          "engine_version",
      -          "language_version",
      -          "service_version",
      -          "wire_version"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "ok",
      -      "ruleset_hash",
      -      "integrity_rule",
      -      "prompts",
      -      "claim_schema",
      -      "versions"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "error": {
      -        "properties": {
      -          "actual": {
      -            "type": "integer"
      -          },
      -          "budget": {
      -            "type": "string"
      -          },
      -          "code": {
      -            "enum": [
      -              "VALIDATION_REJECTED",
      -              "COMPILE_FAILED",
      -              "BUDGET_EXCEEDED",
      -              "RULESET_NOT_FOUND",
      -              "ENGINE_ERROR",
      -              "BAD_REQUEST",
      -              "CREDENTIAL_REQUIRED",
      -              "CREDENTIAL_INVALID",
      -              "CREDENTIAL_SCOPE",
      -              "EVALUATION_LIMIT",
      -              "ENTITLEMENT_EXCEEDED",
      -              "TIER_UNAVAILABLE"
      -            ],
      -            "type": "string"
      -          },
      -          "diagnostics": {
      -            "items": {
      -              "properties": {
      -                "line": {
      -                  "type": [
      -                    "integer",
      -                    "null"
      -                  ]
      -                },
      -                "message": {
      -                  "type": "string"
      -                },
      -                "severity": {
      -                  "enum": [
      -                    "error",
      -                    "warning"
      -                  ],
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "severity",
      -                "message"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "docs": {
      -            "description": "The docs-site page that resolves this code (markdown). Fetch it before retrying blind.",
      -            "format": "uri",
      -            "type": "string"
      -          },
      -          "failure_count": {
      -            "description": "How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says.",
      -            "type": "integer"
      -          },
      -          "failures": {
      -            "description": "EVERY failing field, not the first one.",
      -            "items": {
      -              "properties": {
      -                "expected": {
      -                  "type": "string"
      -                },
      -                "field": {
      -                  "type": "string"
      -                },
      -                "received": {
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "field",
      -                "expected",
      -                "received"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "hint": {
      -            "description": "The grammar guide, carried on compile failures so the next call can succeed without a human.",
      -            "type": "string"
      -          },
      -          "limit": {
      -            "type": "integer"
      -          },
      -          "message": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "message"
      -        ],
      -        "type": "object"
      -      },
      -      "ok": {
      -        "const": false,
      -        "type": "boolean"
      -      },
      -      "versions": {
      -        "description": "Which engine and which wire contract produced this response.",
      -        "properties": {
      -          "engine": {
      -            "example": "dsail-core",
      -            "type": "string"
      -          },
      -          "engine_version": {
      -            "type": "string"
      -          },
      -          "language_version": {
      -            "description": "DSAIL language version.",
      -            "type": "string"
      -          },
      -          "service_version": {
      -            "type": "string"
      -          },
      -          "supported_language_versions": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "wire_version": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "engine",
      -          "engine_version",
      -          "language_version",
      -          "service_version",
      -          "wire_version"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "ok",
      -      "error",
      -      "versions"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "assembly_notes": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "claim_schema": {
      +        "type": "object"
      +      },
      +      "integrity_rule": {
      +        "type": "string"
      +      },
      +      "ok": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "prompts": {
      +        "items": {
      +          "properties": {
      +            "answer_format": {
      +              "type": "string"
      +            },
      +            "claim": {
      +              "type": "string"
      +            },
      +            "context": {
      +              "type": "string"
      +            },
      +            "data_type": {
      +              "type": "string"
      +            },
      +            "ordered_vocabulary": {
      +              "description": "True when the enum was declared ordered, so its members compare with < and >.",
      +              "type": "boolean"
      +            },
      +            "question": {
      +              "type": "string"
      +            },
      +            "range": {
      +              "type": "object"
      +            },
      +            "undetermined_value": {
      +              "description": "The literal to send when this claim could not be determined: \"unknown\", or null where the vocabulary itself contains \"unknown\".",
      +              "type": "string"
      +            },
      +            "unit": {
      +              "type": "string"
      +            },
      +            "unknown_rule": {
      +              "type": "string"
      +            },
      +            "vocabulary": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "claim",
      +            "data_type",
      +            "question",
      +            "answer_format",
      +            "unknown_rule"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "ruleset_hash": {
      +        "type": "string"
      +      },
      +      "validation_contract": {
      +        "type": "object"
      +      },
      +      "versions": {
      +        "description": "Which engine and which wire contract produced this response.",
      +        "properties": {
      +          "engine": {
      +            "example": "dsail-core",
      +            "type": "string"
      +          },
      +          "engine_version": {
      +            "type": "string"
      +          },
      +          "language_version": {
      +            "description": "DSAIL language version.",
      +            "type": "string"
      +          },
      +          "service_version": {
      +            "type": "string"
      +          },
      +          "supported_language_versions": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "wire_version": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "engine",
      +          "engine_version",
      +          "language_version",
      +          "service_version",
      +          "wire_version"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "ruleset_hash",
      +      "integrity_rule",
      +      "prompts",
      +      "claim_schema",
      +      "versions"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "error": {
      +        "properties": {
      +          "actual": {
      +            "description": "How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit.",
      +            "type": "integer"
      +          },
      +          "budget": {
      +            "type": "string"
      +          },
      +          "code": {
      +            "enum": [
      +              "VALIDATION_REJECTED",
      +              "COMPILE_FAILED",
      +              "BUDGET_EXCEEDED",
      +              "RULESET_NOT_FOUND",
      +              "ENGINE_ERROR",
      +              "ENGINE_BUSY",
      +              "BAD_REQUEST",
      +              "CREDENTIAL_REQUIRED",
      +              "CREDENTIAL_INVALID",
      +              "CREDENTIAL_SCOPE",
      +              "EVALUATION_LIMIT",
      +              "ENTITLEMENT_EXCEEDED",
      +              "TIER_UNAVAILABLE"
      +            ],
      +            "type": "string"
      +          },
      +          "diagnostics": {
      +            "items": {
      +              "properties": {
      +                "line": {
      +                  "type": [
      +                    "integer",
      +                    "null"
      +                  ]
      +                },
      +                "message": {
      +                  "type": "string"
      +                },
      +                "severity": {
      +                  "enum": [
      +                    "error",
      +                    "warning"
      +                  ],
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "severity",
      +                "message"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "docs": {
      +            "description": "The docs-site page that resolves this code (markdown). Fetch it before retrying blind.",
      +            "format": "uri",
      +            "type": "string"
      +          },
      +          "failure_count": {
      +            "description": "How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says.",
      +            "type": "integer"
      +          },
      +          "failures": {
      +            "description": "EVERY failing field, not the first one.",
      +            "items": {
      +              "properties": {
      +                "expected": {
      +                  "type": "string"
      +                },
      +                "field": {
      +                  "type": "string"
      +                },
      +                "received": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "field",
      +                "expected",
      +                "received"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "hint": {
      +            "description": "The grammar guide, carried on compile failures so the next call can succeed without a human.",
      +            "type": "string"
      +          },
      +          "limit": {
      +            "type": "integer"
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "retry_after_ms": {
      +            "description": "ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After.",
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "ok": {
      +        "const": false,
      +        "type": "boolean"
      +      },
      +      "versions": {
      +        "description": "Which engine and which wire contract produced this response.",
      +        "properties": {
      +          "engine": {
      +            "example": "dsail-core",
      +            "type": "string"
      +          },
      +          "engine_version": {
      +            "type": "string"
      +          },
      +          "language_version": {
      +            "description": "DSAIL language version.",
      +            "type": "string"
      +          },
      +          "service_version": {
      +            "type": "string"
      +          },
      +          "supported_language_versions": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "wire_version": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "engine",
      +          "engine_version",
      +          "language_version",
      +          "service_version",
      +          "wire_version"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "error",
      +      "versions"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed3 schema fields changed
    • addedInput schema / properties / ruleset_hash / description
      Added value: +"The content hash of an already compiled ruleset (from `dsail_compile` or a saved name). Give this OR `source`, not both."
    • addedInput schema / properties / source / description
      Added value: +"DSAIL source text, byte for byte as compiled. Give this OR `ruleset_hash`; prefer the hash for anything already compiled."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "One extraction prompt per claim, the claim JSON schema and the validation rules. On failure `ok` is false and `error` carries `code`, `message` and `docs`, the URL of the page that resolves it.",
      +  "oneOf": [
      +    {
      +      "properties": {
      +        "assembly_notes": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "claim_schema": {
      +          "type": "object"
      +        },
      +        "integrity_rule": {
      +          "type": "string"
      +        },
      +        "ok": {
      +          "const": true,
      +          "type": "boolean"
      +        },
      +        "prompts": {
      +          "items": {
      +            "properties": {
      +              "answer_format": {
      +                "type": "string"
      +              },
      +              "claim": {
      +                "type": "string"
      +              },
      +              "context": {
      +                "type": "string"
      +              },
      +              "data_type": {
      +                "type": "string"
      +              },
      +              "ordered_vocabulary": {
      +                "description": "True when the enum was declared ordered, so its members compare with < and >.",
      +                "type": "boolean"
      +              },
      +              "question": {
      +                "type": "string"
      +              },
      +              "range": {
      +                "type": "object"
      +              },
      +              "undetermined_value": {
      +                "description": "The literal to send when this claim could not be determined: \"unknown\", or null where the vocabulary itself contains \"unknown\".",
      +                "type": "string"
      +              },
      +              "unit": {
      +                "type": "string"
      +              },
      +              "unknown_rule": {
      +                "type": "string"
      +              },
      +              "vocabulary": {
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              }
      +            },
      +            "required": [
      +              "claim",
      +              "data_type",
      +              "question",
      +              "answer_format",
      +              "unknown_rule"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "ruleset_hash": {
      +          "type": "string"
      +        },
      +        "validation_contract": {
      +          "type": "object"
      +        },
      +        "versions": {
      +          "description": "Which engine and which wire contract produced this response.",
      +          "properties": {
      +            "engine": {
      +              "example": "dsail-core",
      +              "type": "string"
      +            },
      +            "engine_version": {
      +              "type": "string"
      +            },
      +            "language_version": {
      +              "description": "DSAIL language version.",
      +              "type": "string"
      +            },
      +            "service_version": {
      +              "type": "string"
      +            },
      +            "supported_language_versions": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "wire_version": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "engine",
      +            "engine_version",
      +            "language_version",
      +            "service_version",
      +            "wire_version"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "ok",
      +        "ruleset_hash",
      +        "integrity_rule",
      +        "prompts",
      +        "claim_schema",
      +        "versions"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "properties": {
      +        "error": {
      +          "properties": {
      +            "actual": {
      +              "type": "integer"
      +            },
      +            "budget": {
      +              "type": "string"
      +            },
      +            "code": {
      +              "enum": [
      +                "VALIDATION_REJECTED",
      +                "COMPILE_FAILED",
      +                "BUDGET_EXCEEDED",
      +                "RULESET_NOT_FOUND",
      +                "ENGINE_ERROR",
      +                "BAD_REQUEST",
      +                "CREDENTIAL_REQUIRED",
      +                "CREDENTIAL_INVALID",
      +                "CREDENTIAL_SCOPE",
      +                "EVALUATION_LIMIT",
      +                "ENTITLEMENT_EXCEEDED",
      +                "TIER_UNAVAILABLE"
      +              ],
      +              "type": "string"
      +            },
      +            "diagnostics": {
      +              "items": {
      +                "properties": {
      +                  "line": {
      +                    "type": [
      +                      "integer",
      +                      "null"
      +                    ]
      +                  },
      +                  "message": {
      +                    "type": "string"
      +                  },
      +                  "severity": {
      +                    "enum": [
      +                      "error",
      +                      "warning"
      +                    ],
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "severity",
      +                  "message"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "docs": {
      +              "description": "The docs-site page that resolves this code (markdown). Fetch it before retrying blind.",
      +              "format": "uri",
      +              "type": "string"
      +            },
      +            "failure_count": {
      +              "description": "How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says.",
      +              "type": "integer"
      +            },
      +            "failures": {
      +              "description": "EVERY failing field, not the first one.",
      +              "items": {
      +                "properties": {
      +                  "expected": {
      +                    "type": "string"
      +                  },
      +                  "field": {
      +                    "type": "string"
      +                  },
      +                  "received": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "field",
      +                  "expected",
      +                  "received"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "hint": {
      +              "description": "The grammar guide, carried on compile failures so the next call can succeed without a human.",
      +              "type": "string"
      +            },
      +            "limit": {
      +              "type": "integer"
      +            },
      +            "message": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "code",
      +            "message"
      +          ],
      +          "type": "object"
      +        },
      +        "ok": {
      +          "const": false,
      +          "type": "boolean"
      +        },
      +        "versions": {
      +          "description": "Which engine and which wire contract produced this response.",
      +          "properties": {
      +            "engine": {
      +              "example": "dsail-core",
      +              "type": "string"
      +            },
      +            "engine_version": {
      +              "type": "string"
      +            },
      +            "language_version": {
      +              "description": "DSAIL language version.",
      +              "type": "string"
      +            },
      +            "service_version": {
      +              "type": "string"
      +            },
      +            "supported_language_versions": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "wire_version": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "engine",
      +            "engine_version",
      +            "language_version",
      +            "service_version",
      +            "wire_version"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "ok",
      +        "error",
      +        "versions"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With annotations already declaring idempotency and non-destructiveness, the description adds valuable behavioral context beyond the structured data: 'The prompts are for the caller's own model to run; this service calls no model.' This clarifies side-effect-free behavior and the division of labor between caller and service.

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?

Every sentence earns its place: purpose, usage, return value, behavioral note, and relation to check. The description is front-loaded with the core action and remains structured without redundancy.

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 rich schema descriptions, annotations, and an output schema, the description provides sufficient context for an agent to decide when to use the tool and what to expect. It covers the what, why, and how the result is used, with no critical missing information.

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%, and the schema already explains the 'source' and 'ruleset_hash' parameters, including the OR relationship and preference for hash. The tool description itself does not add further parameter-level meaning, so the baseline score of 3 is appropriate.

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 immediately states a specific verb and resource: 'Get the exact questions to ask a document so the answers can be checked against a written policy.' It goes on to describe the return payload (prompt per claim, JSON schema, validation rules), which clearly distinguishes this from siblings like dsail_check or dsail_compile.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit use cases: 'Use when reviewers pull different facts from the same kind of document, or the caller needs a consistent set of questions before applying decided rules.' It also positions the tool relative to dsail_check by noting 'the assembled claim dictionary is what a check takes.' It does not explicitly name alternative tools or say when not to use it, so it falls just short of a 5.

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.