Skip to main content
Glama

Parse B2B Contract & RFP Metadata

parse_b2b_contract
Read-onlyIdempotent

Extract structured contract metadata (contracting parties, effective and termination dates, total contract value, payment terms, key deliverables, security clearances, and governing law) from unstructured B2B contracts, Statements of Work (SOWs), or RFPs into normalized JSON. This is a read-only, stateless, non-destructive extraction call (requires X-RapidAPI-Key; accepts 50 to 100,000 characters in raw_text, and document_type_hint optionally biases extraction rules toward federal RFP, MSA, SOW, or NDA conventions). Use this tool when you need general commercial or header metadata from a contract; use extract_pricing_schedule instead for line-by-line CLIN/rate-card tables, audit_contract_risks for toxic clause redlining, or generate_compliance_matrix for Section C/L/M requirement shredding.

Input Schema

NameRequiredDescriptionDefault
raw_textYesRaw unstructured text from a B2B contract, Master Services Agreement (MSA), Statement of Work (SOW), or Request for Proposal (RFP) between 50 and 100,000 characters.
document_type_hintNoOptional document type hint (e.g., 'RFP', 'MSA', 'SOW').

Output Schema

NameRequiredDescriptionDefault
is_awardedNoA boolean indicating if this document is a past award (True) or an active, open bid/solicitation (False).
buyer_entityNoThe organization, government authority, or enterprise issuing the RFP, tender, or legal contract.
key_deliverablesNoA list of the main project deliverables, milestones, goods, or work products required.
total_budget_usdNoThe stated budget, maximum contract value, or total fee in USD. Must be None if no explicit financial figure is mentioned.
submission_deadlineNoThe exact deadline for submission in ISO 8601 format (e.g., 'YYYY-MM-DD' or 'YYYY-MM-DDTHH:MM:SSZ'). Must be None if missing.
vendor_requirementsNoA list of strict technical, security, licensing, or compliance qualifications required from the vendor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed19 schema fields changed
    • removedInput schema / properties / document_type_hint / default
      Removed value: -"AUTO"
    • changedInput schema / properties / document_type_hint / description
      Previous value: -"Optional document classification hint ('RFP', 'MSA', 'SOW', 'NDA', 'SUBCONTRACT', or 'AUTO') used to prioritize federal solicitation fields vs. commercial agreement terms."New value: +"Optional document type hint (e.g., 'RFP', 'MSA', 'SOW')."
    • removedInput schema / properties / document_type_hint / enum
      Removed value: -[
      -  "RFP",
      -  "MSA",
      -  "SOW",
      -  "NDA",
      -  "SUBCONTRACT",
      -  "AUTO"
      -]
    • addedInput schema / properties / document_type_hint / maxLength
      Added value: +100000
    • addedInput schema / properties / document_type_hint / minLength
      Added value: +1
    • addedOutput schema / properties / buyer_entity
      Added value: +{
      +  "description": "The organization, government authority, or enterprise issuing the RFP, tender, or legal contract.",
      +  "type": "string"
      +}
    • removedOutput schema / properties / deliverables
      Removed value: -{
      -  "description": "Core technical and operational deliverables.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / document_type
      Removed value: -{
      -  "description": "Detected contract or solicitation type.",
      -  "type": "string"
      -}
    • removedOutput schema / properties / effective_date
      Removed value: -{
      -  "description": "ISO-8601 effective or posting date if present.",
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / governing_law
      Removed value: -{
      -  "description": "Governing jurisdiction or acquisition regulation (e.g., FAR/DFARS, Delaware).",
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • addedOutput schema / properties / is_awarded
      Added value: +{
      +  "description": "A boolean indicating if this document is a past award (True) or an active, open bid/solicitation (False).",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / key_deliverables
      Added value: +{
      +  "description": "A list of the main project deliverables, milestones, goods, or work products required.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / parties
      Removed value: -{
      -  "description": "Identified contracting parties or issuing agency.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / payment_terms
      Removed value: -{
      -  "description": "Payment schedule, Net terms, or contract pricing type (FFP, T&M, CPFF).",
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • addedOutput schema / properties / submission_deadline
      Added value: +{
      +  "description": "The exact deadline for submission in ISO 8601 format (e.g., 'YYYY-MM-DD' or 'YYYY-MM-DDTHH:MM:SSZ'). Must be None if missing.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / termination_or_due_date
      Removed value: -{
      -  "description": "Contract expiration or proposal submission deadline.",
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • addedOutput schema / properties / total_budget_usd
      Added value: +{
      +  "description": "The stated budget, maximum contract value, or total fee in USD. Must be None if no explicit financial figure is mentioned.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / total_contract_value
      Removed value: -{
      -  "description": "Extracted total contract ceiling or value.",
      -  "type": [
      -    "number",
      -    "string",
      -    "null"
      -  ]
      -}
    • addedOutput schema / properties / vendor_requirements
      Added value: +{
      +  "description": "A list of strict technical, security, licensing, or compliance qualifications required from the vendor.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed7 schema fields changed
    • addedInput schema / properties / document_type_hint / default
      Added value: +"AUTO"
    • changedInput schema / properties / document_type_hint / description
      Previous value: -"Optional document type hint (e.g., 'RFP', 'MSA', 'SOW')."New value: +"Optional document classification hint ('RFP', 'MSA', 'SOW', 'NDA', 'SUBCONTRACT', or 'AUTO') used to prioritize federal solicitation fields vs. commercial agreement terms."
    • addedInput schema / properties / document_type_hint / enum
      Added value: +[
      +  "RFP",
      +  "MSA",
      +  "SOW",
      +  "NDA",
      +  "SUBCONTRACT",
      +  "AUTO"
      +]
    • changedInput schema / properties / raw_text / description
      Previous value: -"Raw unstructured text from a contract, Statement of Work (SOW), or RFP (min 50 chars)."New value: +"Raw unstructured text from a B2B contract, Master Services Agreement (MSA), Statement of Work (SOW), or Request for Proposal (RFP) between 50 and 100,000 characters."
    • addedInput schema / properties / raw_text / maxLength
      Added value: +100000
    • addedInput schema / properties / raw_text / minLength
      Added value: +50
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "deliverables": {
      +      "description": "Core technical and operational deliverables.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "document_type": {
      +      "description": "Detected contract or solicitation type.",
      +      "type": "string"
      +    },
      +    "effective_date": {
      +      "description": "ISO-8601 effective or posting date if present.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "governing_law": {
      +      "description": "Governing jurisdiction or acquisition regulation (e.g., FAR/DFARS, Delaware).",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "parties": {
      +      "description": "Identified contracting parties or issuing agency.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "payment_terms": {
      +      "description": "Payment schedule, Net terms, or contract pricing type (FFP, T&M, CPFF).",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "termination_or_due_date": {
      +      "description": "Contract expiration or proposal submission deadline.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "total_contract_value": {
      +      "description": "Extracted total contract ceiling or value.",
      +      "type": [
      +        "number",
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, but the description adds real context beyond them: it is stateless, requires an X-RapidAPI-Key, and accepts a bounded 50–100,000 character input. What it omits is failure behavior (malformed/undersized text, missing key) and whether extraction degrades on partial documents. A delivered output schema removes the need to describe return shape.

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?

Two sentences, both front-loaded with the highest-value information (what is extracted, then when to use it versus alternatives). The sibling-routing sentence is a long parenthetical run of four tool names, which is dense but each clause earns its place by preventing a misroute. Slightly heavy for two sentences, but no 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 two-parameter extraction call with full schema coverage, complete annotations, and an output schema, the description covers purpose, input bounds, auth, statelessness, and sibling routing. An agent has everything needed to decide to call it and how to shape the input; return values are handled by the output schema.

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 both parameters are self-documented at baseline 3. The description goes further by explaining what `document_type_hint` actually does — it biases extraction rules toward federal RFP, MSA, SOW, or NDA conventions — which is semantically richer than the schema's bare 'e.g., RFP, MSA, SOW'. It does not explain the consequence of an unrecognized hint value.

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 opens with a specific verb ('Extract') and an enumerated resource list (parties, dates, TCV, payment terms, deliverables, clearances, governing law) plus an output target ('normalized JSON'). It also names the document classes it accepts (B2B contracts, SOWs, RFPs), so an agent can distinguish it from a generic parser without opening the schema.

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?

Explicit selection criteria are given: use this for general commercial or header metadata, and use `extract_pricing_schedule`, `audit_contract_risks`, or `generate_compliance_matrix` for the three named adjacent jobs. Each alternative is paired with the condition that selects it (CLIN/rate-card tables, toxic clause redlining, Section C/L/M shredding), leaving nothing to inference.

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.

Resources