{
  "openapi": "3.1.1",
  "info": {
    "title": "AMD Machines Machined-Parts Quote Request API",
    "version": "1.0.0",
    "summary": "Request a quote from AMD Machines for custom parts made to your drawing or approved sample. Returns no prices or quotes.",
    "description": "- This service requests a quote for custom parts made to a drawing or an approved sample. It returns no prices or quotes; AMD Machines replies by email.\n- Ask the export-control question first. On yes, maybe or unknown, send only the contact fields and that answer (and how and in which language to reply).\n- List the parts as lines, one line per part, at most 10, each with a short label; line n is lines[n-1]. Write each answer to the path that next_batch gives.\n- Show the human the brief from check and get their approval before submit.\n- Say the request was sent only when submit returns forwarded: true and an AGT- reference id.\n- If you cannot send POST requests, read https://amdmachines.com/agents/questions.txt (its machined-parts offering), interview the human, write one block per part, and give the human the finished request to paste into https://amdmachines.com/contact/ (project type Custom Laboratory Parts, or Other) or to email to sales@amdmachines.com; tell the human nothing has been sent.\n- Send a descriptive User-Agent, for example ExampleAgent/1.0.\n- Files follow by email after AMD replies.\n- For a machine (custom or build-to-print), use https://amdmachines.com/api/agent-quote/v1/ or https://amdmachines.com/mcp.\n- Rate limits are best-effort: about 120 calls a minute per network, and 10 submits an hour per network and email address (30 per network). On 429, wait for Retry-After or use https://amdmachines.com/contact/.",
    "contact": {
      "name": "AMD Machines",
      "url": "https://amdmachines.com/agents/machined-parts/",
      "email": "sales@amdmachines.com"
    }
  },
  "servers": [
    {
      "url": "https://amdmachines.com"
    }
  ],
  "externalDocs": {
    "url": "https://amdmachines.com/agents/machined-parts/"
  },
  "x-amd-versions": {
    "questionnaire": "2026-11-04.1",
    "machined_parts": "2026-11-04.1",
    "catalog": "7bae8ac5ab0f"
  },
  "paths": {
    "/api/parts-quote/v1/": {
      "get": {
        "operationId": "getPartsApiIndex",
        "summary": "Start here: endpoints, documents, rules and published facts",
        "description": "The endpoint URLs, the documents for agents, the rules every agent follows, and AMD Machines' published facts on replies, next steps, files, ITAR, where parts are made and delivery dates. Returns no prices or quotes.",
        "responses": {
          "200": {
            "description": "The API index.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "api_version": {
                      "type": "string"
                    },
                    "service": {
                      "type": "string"
                    },
                    "endpoints": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "docs": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "rules": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "facts": {
                      "type": "object",
                      "additionalProperties": {
                        "$ref": "#/components/schemas/Fact"
                      }
                    },
                    "error": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "https_required: Use https.",
            "x-amd-error-codes": [
              "https_required"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Too many requests from this network. Wait for Retry-After, or use https://amdmachines.com/contact/.",
            "x-amd-error-codes": [
              "rate_limited"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Something went wrong. Please try again, or use https://amdmachines.com/contact/.",
            "x-amd-error-codes": [
              "internal_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/parts-quote/v1/health": {
      "get": {
        "operationId": "getPartsHealth",
        "summary": "Check that the service is up",
        "description": "Liveness and versions: API, questionnaire, parts and catalog versions, the number of products, whether forwarding is switched on (only amdmachines.com forwards; other hosts answer dry runs only), and the MCP protocol versions. Calls nothing else.",
        "responses": {
          "200": {
            "description": "The service is up.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          },
          "400": {
            "description": "https_required: Use https.",
            "x-amd-error-codes": [
              "https_required"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Too many requests from this network. Wait for Retry-After, or use https://amdmachines.com/contact/.",
            "x-amd-error-codes": [
              "rate_limited"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Something went wrong. Please try again, or use https://amdmachines.com/contact/.",
            "x-amd-error-codes": [
              "internal_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/parts-quote/v1/questions": {
      "get": {
        "operationId": "getPartsQuestions",
        "summary": "Get AMD Machines' machined-parts questions",
        "description": "The request questions, the fields to ask for each part line (one line per part, at most 10), the interview batches with the export-control question first, and the inputs for a budgetary review of each part. Use mode=quick for a first pass. No prices.",
        "x-amd-mcp-tool": "get_parts_quote_questions",
        "parameters": [
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "description": "full (default) or quick: the required, high-value and budgetary questions only, for a first pass.",
            "schema": {
              "type": "string",
              "enum": [
                "full",
                "quick"
              ],
              "default": "full"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The questions (components.schemas.PublicQuestion), the line fields and the interview batches.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartsQuestionsResult"
                }
              }
            }
          },
          "400": {
            "description": "invalid_mode: mode must be full or quick. https_required: Use https.",
            "x-amd-error-codes": [
              "invalid_mode",
              "https_required"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Too many requests from this network. Wait for Retry-After, or use https://amdmachines.com/contact/.",
            "x-amd-error-codes": [
              "rate_limited"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Something went wrong. Please try again, or use https://amdmachines.com/contact/.",
            "x-amd-error-codes": [
              "internal_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/parts-quote/v1/check": {
      "post": {
        "operationId": "checkPartsQuoteRequest",
        "summary": "Check a draft machined-parts quote request (sends nothing)",
        "description": "Validates a draft and returns errors, ready_to_submit, completeness, next_batch (each line field with its part lines and JSON paths) and budgetary readiness per part; once next_batch is empty, or with detail full, also the masked brief AMD would receive. Show it to the human.",
        "x-amd-mcp-tool": "check_parts_quote_request",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The check report, also when the draft is not valid yet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartsCheckResult"
                }
              }
            }
          },
          "400": {
            "description": "invalid_json: The body is not valid JSON. invalid_body: The body must be a JSON object. too_deep: The request is nested too deeply or has too many items. https_required: Use https.",
            "x-amd-error-codes": [
              "invalid_json",
              "invalid_body",
              "too_deep",
              "https_required"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "body_too_large: The request is too large.",
            "x-amd-error-codes": [
              "body_too_large"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Send Content-Type: application/json.",
            "x-amd-error-codes": [
              "unsupported_media_type"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Too many requests from this network. Wait for Retry-After, or use https://amdmachines.com/contact/.",
            "x-amd-error-codes": [
              "rate_limited"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Something went wrong. Please try again, or use https://amdmachines.com/contact/.",
            "x-amd-error-codes": [
              "internal_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/parts-quote/v1/submit": {
      "post": {
        "operationId": "submitPartsQuoteRequest",
        "summary": "Submit a machined-parts quote request to AMD Machines",
        "description": "Emails the request to AMD's sales team. Call it only after checkPartsQuoteRequest reports ready_to_submit and the human approved the brief; set consent.contact_ok to true then. Sent only when forwarded is true with an AGT- id. dry_run: true sends nothing.",
        "x-amd-mcp-tool": "submit_parts_quote_request",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitPartsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Forwarded, a duplicate of a request already sent, or a dry run.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartsSubmitResult"
                }
              }
            }
          },
          "400": {
            "description": "invalid_json: The body is not valid JSON. invalid_body: The body must be a JSON object. too_deep: The request is nested too deeply or has too many items. invalid_email: The email address was not accepted. Confirm it with the buyer. email_blocked: This email address cannot be used here. Ask the buyer for another address, or have them email sales@amdmachines.com. https_required: Use https.",
            "x-amd-error-codes": [
              "invalid_json",
              "invalid_body",
              "too_deep",
              "invalid_email",
              "email_blocked",
              "https_required"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "origin_not_allowed: Call this from a server or through MCP, not from another website. forwarding_disabled: This host does not send requests. Nothing was sent. Use https://amdmachines.com/api/parts-quote/v1/submit.",
            "x-amd-error-codes": [
              "origin_not_allowed",
              "forwarding_disabled"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "body_too_large: The request is too large.",
            "x-amd-error-codes": [
              "body_too_large"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Send Content-Type: application/json.",
            "x-amd-error-codes": [
              "unsupported_media_type"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Some fields need attention. Fix the fields listed in details and send again.",
            "x-amd-error-codes": [
              "validation_failed"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Too many requests from this network. Wait for Retry-After, or use https://amdmachines.com/contact/.",
            "x-amd-error-codes": [
              "rate_limited"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Something went wrong. Please try again, or use https://amdmachines.com/contact/.",
            "x-amd-error-codes": [
              "internal_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "forwarding_rejected: The request could not be delivered. Nothing more can be done here; use the contact_fallback.",
            "x-amd-error-codes": [
              "forwarding_rejected"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "upstream_unavailable: AMD's request system did not confirm receipt, so the request may not have arrived. Retry once in a minute with the same idempotency_key (AMD Machines sees the same key on a repeated request), or use the contact_fallback. temporarily_unavailable: Requests cannot be sent right now. Nothing was sent. Use the contact_fallback.",
            "x-amd-error-codes": [
              "upstream_unavailable",
              "temporarily_unavailable"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          }
        }
      }
    },
    "/api/parts-quote/v1/openapi.json": {
      "get": {
        "operationId": "getPartsOpenApi",
        "summary": "Find this document",
        "description": "Redirects (301) to https://amdmachines.com/agents/machined-parts/openapi.json, this OpenAPI document.",
        "responses": {
          "301": {
            "description": "Moved permanently to this document.",
            "headers": {
              "Location": {
                "description": "The URL of this document.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "https_required: Use https.",
            "x-amd-error-codes": [
              "https_required"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Too many requests from this network. Wait for Retry-After, or use https://amdmachines.com/contact/.",
            "x-amd-error-codes": [
              "rate_limited"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Something went wrong. Please try again, or use https://amdmachines.com/contact/.",
            "x-amd-error-codes": [
              "internal_error"
            ],
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PartsRequest": {
        "type": "object",
        "properties": {
          "product": {
            "type": "string",
            "enum": [
              "machined-parts",
              "laboratory-parts",
              "tooling"
            ],
            "description": "Optional. laboratory-parts for parts and fixtures for research laboratories, tooling for press dies, weld fixtures and tooling, machined-parts for any other part. Without it, a request whose lines are all laboratory parts is laboratory-parts and any other is machined-parts."
          },
          "contact": {
            "type": "object",
            "properties": {
              "first_name": {
                "type": "string",
                "maxLength": 100
              },
              "last_name": {
                "type": "string",
                "maxLength": 100
              },
              "email": {
                "type": "string",
                "maxLength": 254
              },
              "company": {
                "type": "string",
                "maxLength": 200
              },
              "phone": {
                "type": "string",
                "maxLength": 40
              },
              "job_title": {
                "type": "string",
                "maxLength": 120
              },
              "company_website": {
                "type": "string",
                "maxLength": 200
              }
            }
          },
          "consent": {
            "type": "object",
            "properties": {
              "contact_ok": {
                "type": "boolean",
                "description": "True only if the person reviewed this request and agreed that AMD Machines may contact them."
              }
            }
          },
          "answers": {
            "type": "object",
            "description": "Request-level answers keyed by the question ids of get_parts_quote_questions (questions).",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 4000
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "array",
                  "maxItems": 20,
                  "items": {
                    "type": "string",
                    "maxLength": 64
                  }
                }
              ]
            }
          },
          "lines": {
            "type": "array",
            "minItems": 0,
            "maxItems": 10,
            "description": "One object per part, at most 10; at least one unless the project may be export controlled. Line n is lines[n-1]. Keys are the line_fields ids without the line. prefix; values follow get_parts_quote_questions; \"unknown\" is accepted for every field but label. In export-control mode send no lines.",
            "items": {
              "type": "object",
              "required": [
                "label"
              ],
              "properties": {
                "label": {
                  "type": "string",
                  "maxLength": 60
                },
                "kind": {
                  "type": "string"
                },
                "drawing_status": {
                  "type": "string"
                },
                "revision": {
                  "type": "string",
                  "maxLength": 20
                },
                "material_grade": {
                  "type": "string",
                  "maxLength": 200
                },
                "qty_now": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 10000000
                    },
                    {
                      "type": "string",
                      "maxLength": 20
                    }
                  ]
                },
                "qty_repeat": {
                  "type": "string",
                  "maxLength": 100
                },
                "size": {
                  "type": "string",
                  "maxLength": 200
                },
                "tolerances": {
                  "type": "string",
                  "maxLength": 400
                },
                "finish": {
                  "type": "string",
                  "maxLength": 300
                },
                "environment": {
                  "type": "string",
                  "maxLength": 300
                },
                "mating": {
                  "type": "string",
                  "maxLength": 300
                },
                "tool_life": {
                  "type": "string",
                  "maxLength": 300
                },
                "failure": {
                  "type": "string",
                  "maxLength": 800
                },
                "needed_by": {
                  "type": "string"
                },
                "file_names": {
                  "type": "string",
                  "maxLength": 300
                }
              }
            }
          },
          "agent": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 100
              },
              "operator": {
                "type": "string",
                "maxLength": 100
              },
              "version": {
                "type": "string",
                "maxLength": 50
              }
            }
          },
          "idempotency_key": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{8,64}$",
            "description": "Create a new random key (8 to 64 letters, digits or . _ : -; a UUID works) for each new or corrected request, and reuse it only to retry that same request."
          },
          "supersedes": {
            "type": "string",
            "pattern": "^AGT-[0-9A-HJKMNP-TV-Z]{5}-[0-9A-HJKMNP-TV-Z]{5}$",
            "description": "The reference id of an earlier request that this one corrects."
          },
          "dry_run": {
            "type": "boolean",
            "description": "submit only: true validates and builds the message without sending anything."
          },
          "detail": {
            "type": "string",
            "enum": [
              "compact",
              "full"
            ],
            "description": "compact (default while next_batch is not empty) or full: the whole report and the masked brief now."
          }
        }
      },
      "SubmitPartsRequest": {
        "type": "object",
        "properties": {
          "product": {
            "type": "string",
            "enum": [
              "machined-parts",
              "laboratory-parts",
              "tooling"
            ],
            "description": "Optional. laboratory-parts for parts and fixtures for research laboratories, tooling for press dies, weld fixtures and tooling, machined-parts for any other part. Without it, a request whose lines are all laboratory parts is laboratory-parts and any other is machined-parts."
          },
          "contact": {
            "type": "object",
            "properties": {
              "first_name": {
                "type": "string",
                "maxLength": 100
              },
              "last_name": {
                "type": "string",
                "maxLength": 100
              },
              "email": {
                "type": "string",
                "maxLength": 254
              },
              "company": {
                "type": "string",
                "maxLength": 200
              },
              "phone": {
                "type": "string",
                "maxLength": 40
              },
              "job_title": {
                "type": "string",
                "maxLength": 120
              },
              "company_website": {
                "type": "string",
                "maxLength": 200
              }
            }
          },
          "consent": {
            "type": "object",
            "properties": {
              "contact_ok": {
                "type": "boolean",
                "description": "True only if the person reviewed this request and agreed that AMD Machines may contact them."
              }
            }
          },
          "answers": {
            "type": "object",
            "description": "Request-level answers keyed by the question ids of get_parts_quote_questions (questions).",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 4000
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "array",
                  "maxItems": 20,
                  "items": {
                    "type": "string",
                    "maxLength": 64
                  }
                }
              ]
            }
          },
          "lines": {
            "type": "array",
            "minItems": 0,
            "maxItems": 10,
            "description": "One object per part, at most 10; at least one unless the project may be export controlled. Line n is lines[n-1]. Keys are the line_fields ids without the line. prefix; values follow get_parts_quote_questions; \"unknown\" is accepted for every field but label. In export-control mode send no lines.",
            "items": {
              "type": "object",
              "required": [
                "label"
              ],
              "properties": {
                "label": {
                  "type": "string",
                  "maxLength": 60
                },
                "kind": {
                  "type": "string"
                },
                "drawing_status": {
                  "type": "string"
                },
                "revision": {
                  "type": "string",
                  "maxLength": 20
                },
                "material_grade": {
                  "type": "string",
                  "maxLength": 200
                },
                "qty_now": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 10000000
                    },
                    {
                      "type": "string",
                      "maxLength": 20
                    }
                  ]
                },
                "qty_repeat": {
                  "type": "string",
                  "maxLength": 100
                },
                "size": {
                  "type": "string",
                  "maxLength": 200
                },
                "tolerances": {
                  "type": "string",
                  "maxLength": 400
                },
                "finish": {
                  "type": "string",
                  "maxLength": 300
                },
                "environment": {
                  "type": "string",
                  "maxLength": 300
                },
                "mating": {
                  "type": "string",
                  "maxLength": 300
                },
                "tool_life": {
                  "type": "string",
                  "maxLength": 300
                },
                "failure": {
                  "type": "string",
                  "maxLength": 800
                },
                "needed_by": {
                  "type": "string"
                },
                "file_names": {
                  "type": "string",
                  "maxLength": 300
                }
              }
            }
          },
          "agent": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 100
              },
              "operator": {
                "type": "string",
                "maxLength": 100
              },
              "version": {
                "type": "string",
                "maxLength": 50
              }
            }
          },
          "idempotency_key": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{8,64}$",
            "description": "Create a new random key (8 to 64 letters, digits or . _ : -; a UUID works) for each new or corrected request, and reuse it only to retry that same request."
          },
          "supersedes": {
            "type": "string",
            "pattern": "^AGT-[0-9A-HJKMNP-TV-Z]{5}-[0-9A-HJKMNP-TV-Z]{5}$",
            "description": "The reference id of an earlier request that this one corrects."
          },
          "dry_run": {
            "type": "boolean",
            "description": "submit only: true validates and builds the message without sending anything."
          },
          "detail": {
            "type": "string",
            "enum": [
              "compact",
              "full"
            ],
            "description": "compact (default while next_batch is not empty) or full: the whole report and the masked brief now."
          }
        },
        "required": [
          "contact",
          "consent",
          "answers"
        ]
      },
      "PartsQuestionsResult": {
        "type": "object",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "api_version": {
            "type": "string"
          },
          "questionnaire_version": {
            "type": "string"
          },
          "parts_version": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "offering": {
            "type": "object"
          },
          "max_lines": {
            "type": "integer"
          },
          "required": {
            "type": "array"
          },
          "high_value": {
            "type": "array"
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicQuestion"
            }
          },
          "line_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicQuestion"
            }
          },
          "interview_steps": {
            "type": "array"
          },
          "interview_order": {
            "type": "array"
          },
          "budgetary_inputs": {
            "type": "object"
          },
          "next": {
            "type": "string"
          },
          "error": {
            "type": "object"
          }
        }
      },
      "PartsCheckResult": {
        "type": "object",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "api_version": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          },
          "ready_to_submit": {
            "type": "boolean"
          },
          "consent_needed": {
            "type": "boolean"
          },
          "errors": {
            "type": "array"
          },
          "warnings": {
            "type": "array"
          },
          "ignored": {
            "type": "array"
          },
          "received_fields": {
            "type": "array"
          },
          "branch": {
            "type": [
              "object",
              "null"
            ]
          },
          "part_lines": {
            "type": "object"
          },
          "completeness": {
            "type": [
              "object",
              "null"
            ]
          },
          "missing": {
            "type": "array"
          },
          "missing_ids": {
            "type": "array"
          },
          "unknown": {
            "type": "array"
          },
          "next_batch": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicQuestion"
            }
          },
          "readiness": {
            "type": [
              "object",
              "null"
            ]
          },
          "recommendations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Recommendation"
            }
          },
          "flags": {
            "type": "array"
          },
          "export_control_mode": {
            "type": "boolean"
          },
          "dropped_fields": {
            "type": "array"
          },
          "facts": {
            "type": "object"
          },
          "brief_preview": {
            "type": [
              "object",
              "null"
            ]
          },
          "next": {
            "type": "string"
          },
          "error": {
            "type": "object"
          }
        }
      },
      "PartsSubmitResult": {
        "type": "object",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "api_version": {
            "type": "string"
          },
          "dry_run": {
            "type": "boolean"
          },
          "forwarded": {
            "type": "boolean"
          },
          "duplicate": {
            "type": "boolean"
          },
          "reference_id": {
            "type": "string"
          },
          "line_count": {
            "type": "integer"
          },
          "project_type": {
            "type": "string"
          },
          "message_chars": {
            "type": "integer"
          },
          "received_fields": {
            "type": "array"
          },
          "completeness": {
            "type": [
              "object",
              "null"
            ]
          },
          "readiness": {
            "type": [
              "object",
              "null"
            ]
          },
          "export_control_mode": {
            "type": "boolean"
          },
          "dropped_fields": {
            "type": "array"
          },
          "truncated": {
            "type": "array"
          },
          "next_steps": {
            "type": "array"
          },
          "files": {
            "type": "string"
          },
          "files_reference": {
            "type": "string"
          },
          "nda": {
            "type": "object"
          },
          "contact_fallback": {
            "type": "object"
          },
          "tell_the_human": {
            "type": "string"
          },
          "error": {
            "type": "object"
          },
          "warnings": {
            "type": "array"
          },
          "ignored": {
            "type": "array"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "ok",
          "error"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false
          },
          "api_version": {
            "type": "string"
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "invalid_json",
                  "invalid_body",
                  "too_deep",
                  "body_too_large",
                  "unsupported_media_type",
                  "method_not_allowed",
                  "not_found",
                  "https_required",
                  "origin_not_allowed",
                  "forwarding_disabled",
                  "product_required",
                  "unknown_product",
                  "invalid_offering",
                  "invalid_mode",
                  "unknown_question",
                  "validation_failed",
                  "invalid_email",
                  "email_blocked",
                  "rate_limited",
                  "upstream_unavailable",
                  "forwarding_rejected",
                  "temporarily_unavailable",
                  "internal_error",
                  "too_many_lines"
                ]
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldError"
                }
              },
              "docs": {
                "type": "string"
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Warning"
            }
          },
          "ignored": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contact_fallback": {
            "type": "object"
          }
        }
      },
      "FieldError": {
        "type": "object",
        "required": [
          "field",
          "code",
          "message"
        ],
        "properties": {
          "field": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "did_you_mean": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowed": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "For invalid_value or no_preference_not_allowed on a question with 12 or fewer valid ids: those ids."
          }
        }
      },
      "Warning": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "field": {
            "type": "string",
            "description": "The request field the warning is about, when it is about one."
          }
        }
      },
      "PublicQuestion": {
        "type": "object",
        "required": [
          "id",
          "label",
          "prompt",
          "type",
          "why"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]*\\.[a-z0-9_]+$"
          },
          "label": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "long_text",
              "integer",
              "number",
              "boolean",
              "enum",
              "multi_enum",
              "date",
              "email",
              "phone"
            ]
          },
          "unit": {
            "type": "string"
          },
          "min": {
            "type": "number"
          },
          "max": {
            "type": "number"
          },
          "max_length": {
            "type": "integer"
          },
          "values": {
            "type": "array",
            "description": "[value id, label] pairs.",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 2,
              "maxItems": 2
            }
          },
          "max_items": {
            "type": "integer"
          },
          "priority": {
            "type": "string",
            "enum": [
              "required",
              "high",
              "normal"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "accepts_no_preference": {
            "type": "boolean"
          },
          "ask_if": {
            "$ref": "#/components/schemas/Condition"
          },
          "high_if": {
            "$ref": "#/components/schemas/Condition"
          },
          "why": {
            "type": "string"
          },
          "recommendations": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "title"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                }
              }
            }
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1
            },
            "description": "A line field in next_batch: the part lines (1-based) it is asked for."
          },
          "paths": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A line field in next_batch: the JSON path of each of those answers, paths[i] = lines[lines[i] - 1].<field>."
          }
        }
      },
      "Recommendation": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "title",
          "quote",
          "source",
          "note"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "default",
              "guidance"
            ]
          },
          "title": {
            "type": "string"
          },
          "quote": {
            "type": "string",
            "description": "Published wording, quoted exactly."
          },
          "source": {
            "type": "object",
            "required": [
              "label",
              "url"
            ],
            "properties": {
              "label": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "also": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The other pages the quote is joined from."
              }
            }
          },
          "when": {
            "description": "Offer it only when this holds: one condition, or an array that must all hold.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/Condition"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Condition"
                }
              }
            ]
          },
          "suggested_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "type": "string",
            "description": "Always \"AMD Machines recommendation from published material. Not a commitment, a price or a quote.\""
          },
          "question": {
            "type": "string"
          },
          "applies_to": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Condition": {
        "description": "A question condition holds when the answer is one of any_of (for a list answer, when any selected value is), or at least min. A condition on a question outside the request is ignored. A line field's condition names another field of the same part line.",
        "anyOf": [
          {
            "type": "object",
            "required": [
              "question",
              "any_of"
            ],
            "properties": {
              "question": {
                "type": "string"
              },
              "any_of": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          {
            "type": "object",
            "required": [
              "question",
              "min"
            ],
            "properties": {
              "question": {
                "type": "string"
              },
              "min": {
                "type": "number"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "product_has_module"
            ],
            "properties": {
              "product_has_module": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          {
            "type": "object",
            "required": [
              "product_lacks_module"
            ],
            "properties": {
              "product_lacks_module": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          {
            "type": "object",
            "required": [
              "offering_not"
            ],
            "properties": {
              "offering_not": {
                "type": "string",
                "enum": [
                  "custom_machine",
                  "build_to_print_machine",
                  "machined_parts"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "field",
              "any_of"
            ],
            "properties": {
              "field": {
                "type": "string"
              },
              "any_of": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        ]
      },
      "Fact": {
        "type": "object",
        "required": [
          "quote",
          "source"
        ],
        "properties": {
          "quote": {
            "type": "string",
            "description": "Published wording, quoted exactly."
          },
          "source": {
            "type": "object",
            "required": [
              "label",
              "url"
            ],
            "properties": {
              "label": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "also": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The other pages the quote is joined from."
              }
            }
          }
        }
      },
      "Health": {
        "type": "object",
        "required": [
          "ok",
          "status"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "api_version": {
            "type": "string"
          },
          "questionnaire_version": {
            "type": "string"
          },
          "parts_version": {
            "type": "string"
          },
          "catalog_version": {
            "type": "string"
          },
          "products": {
            "type": "integer"
          },
          "forwarding": {
            "type": "boolean"
          },
          "mcp_versions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
