{"openapi":"3.1.0","info":{"title":"Onshape (BYOK) API","version":"0.1.0","description":"Onshape (BYOK) lets an AI assistant read your own Onshape data through the Onshape API with a key you supply (Onshape API access key). Read-only: 11 tools (get_session_info, list_documents, get_document, list_workspaces, list_versions, list_elements, list_parts, get_part_mass_properties, get_bill_of_materials, list_companies, list_revisions). The BYOK key travels with each request, is used for...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-onshape.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-onshape/docs"},"termsOfService":"https://connectorbay.com/byok-onshape/terms"},"servers":[{"url":"https://byok-onshape.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-onshape/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_session_info":{"post":{"operationId":"get_session_info","summary":"Show which Onshape account the API key belongs to: user id, name, plan group and roles. Use for \"Which Onshape account i","description":"Show which Onshape account the API key belongs to: user id, name, plan group and roles. Use for \"Which Onshape account is this API key for\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_session_infoArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_documents":{"post":{"operationId":"list_documents","summary":"List or search Onshape documents you can access: name, description, owner, created and modified dates. Sorted and paged.","description":"List or search Onshape documents you can access: name, description, owner, created and modified dates. Sorted and paged. Use for \"Which Onshape documents do I have about gearboxes\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Search text matched against document names.","title":"Q"},"filter":{"anyOf":[{"maximum":20,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Document filter number as on the Onshape Documents page, for example 7 for documents owned by a company (combine with owner and owner_type).","title":"Filter"},"owner":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Owner user or company id, used with the filter.","title":"Owner"},"owner_type":{"anyOf":[{"maximum":2,"minimum":0,"type":"integer"},{"type":"null"}],"default":1,"description":"Owner type: 0 for a user, 1 for a company.","title":"Owner Type"},"sort_column":{"anyOf":[{"enum":["createdAt","modifiedAt","name"],"type":"string"},{"type":"null"}],"default":"createdAt","description":"Sort by this column.","title":"Sort Column"},"sort_order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort direction.","title":"Sort Order"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many records to skip, for paging.","title":"Offset"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many records to return (1 to 100).","title":"Limit"}},"title":"list_documentsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_document":{"post":{"operationId":"get_document","summary":"Get one document's details: name, description, owner, default workspace, creation and modification dates, counts of copi","description":"Get one document's details: name, description, owner, default workspace, creation and modification dates, counts of copies and references. Use for \"Show details of Onshape document e60c4803eaf2ac8be492c18e\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"document_id":{"description":"Onshape document id (the id field from list_documents).","maxLength":40,"title":"Document Id","type":"string"}},"required":["document_id"],"title":"get_documentArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_workspaces":{"post":{"operationId":"list_workspaces","summary":"List a document's workspaces (branches) with name, last modified time and microversion. Use for \"Which workspaces does d","description":"List a document's workspaces (branches) with name, last modified time and microversion. Use for \"Which workspaces does document e60c4803eaf2ac8be492c18e have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"document_id":{"description":"Onshape document id (the id field from list_documents).","maxLength":40,"title":"Document Id","type":"string"}},"required":["document_id"],"title":"list_workspacesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_versions":{"post":{"operationId":"list_versions","summary":"List the saved versions of a document with name, description and creation time. Use for \"Which versions has document e60","description":"List the saved versions of a document with name, description and creation time. Use for \"Which versions has document e60c4803eaf2ac8be492c18e been saved at\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"document_id":{"description":"Onshape document id (the id field from list_documents).","maxLength":40,"title":"Document Id","type":"string"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many records to skip, for paging.","title":"Offset"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many records to return (1 to 100).","title":"Limit"}},"required":["document_id"],"title":"list_versionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_elements":{"post":{"operationId":"list_elements","summary":"List the elements (tabs) of a document at a workspace, version or microversion: part studios, assemblies, drawings, blob","description":"List the elements (tabs) of a document at a workspace, version or microversion: part studios, assemblies, drawings, blobs. Filter by type. Use for \"What part studios and assemblies are in document e60c4803eaf2ac8be492c18e\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"document_id":{"description":"Onshape document id (the id field from list_documents).","maxLength":40,"title":"Document Id","type":"string"},"wvm":{"description":"Which kind of id follows: w for workspace, v for version, m for microversion.","enum":["w","v","m"],"title":"Wvm","type":"string"},"wvm_id":{"description":"The workspace, version or microversion id matching wvm.","maxLength":40,"title":"Wvm Id","type":"string"},"element_type":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Only this element type, for example PARTSTUDIO, ASSEMBLY, DRAWING, BLOB.","title":"Element Type"}},"required":["document_id","wvm","wvm_id"],"title":"list_elementsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_parts":{"post":{"operationId":"list_parts","summary":"List the parts of a document at a workspace, version or microversion with part number, name, description, material, vend","description":"List the parts of a document at a workspace, version or microversion with part number, name, description, material, vendor, revision and state. Optionally limited to one element. Use for \"List the parts and part numbers in document e60c4803eaf2ac8be492c18e\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"document_id":{"description":"Onshape document id (the id field from list_documents).","maxLength":40,"title":"Document Id","type":"string"},"wvm":{"description":"Which kind of id follows: w for workspace, v for version, m for microversion.","enum":["w","v","m"],"title":"Wvm","type":"string"},"wvm_id":{"description":"The workspace, version or microversion id matching wvm.","maxLength":40,"title":"Wvm Id","type":"string"},"element_id":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only parts of this element id.","title":"Element Id"},"include_property_defaults":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Include default values of the metadata properties.","title":"Include Property Defaults"}},"required":["document_id","wvm","wvm_id"],"title":"list_partsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_part_mass_properties":{"post":{"operationId":"get_part_mass_properties","summary":"Get a part's mass, volume, centroid and moments of inertia as computed from its geometry and material. Use for \"What is ","description":"Get a part's mass, volume, centroid and moments of inertia as computed from its geometry and material. Use for \"What is the mass and volume of part JHD\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"document_id":{"description":"Onshape document id (the id field from list_documents).","maxLength":40,"title":"Document Id","type":"string"},"wvm":{"description":"Which kind of id follows: w for workspace, v for version, m for microversion.","enum":["w","v","m"],"title":"Wvm","type":"string"},"wvm_id":{"description":"The workspace, version or microversion id matching wvm.","maxLength":40,"title":"Wvm Id","type":"string"},"element_id":{"description":"Element (tab) id inside the document, from list_elements.","maxLength":40,"title":"Element Id","type":"string"},"part_id":{"description":"Part id inside the element, from list_parts.","maxLength":40,"title":"Part Id","type":"string"}},"required":["document_id","wvm","wvm_id","element_id","part_id"],"title":"get_part_mass_propertiesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_bill_of_materials":{"post":{"operationId":"get_bill_of_materials","summary":"Get the bill of materials table of an assembly element, as Onshape reports it: items, quantities, part numbers, descript","description":"Get the bill of materials table of an assembly element, as Onshape reports it: items, quantities, part numbers, descriptions and materials. Single level by default. Use for \"Show the bill of materials of assembly 8e35cd9cb0d5e45bd5b0d9fc\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"document_id":{"description":"Onshape document id (the id field from list_documents).","maxLength":40,"title":"Document Id","type":"string"},"wvm":{"description":"Which kind of id follows: w for workspace, v for version, m for microversion.","enum":["w","v","m"],"title":"Wvm","type":"string"},"wvm_id":{"description":"The workspace, version or microversion id matching wvm.","maxLength":40,"title":"Wvm Id","type":"string"},"element_id":{"description":"Element (tab) id inside the document, from list_elements.","maxLength":40,"title":"Element Id","type":"string"},"indented":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"Return an indented (nested) BOM.","title":"Indented"},"multi_level":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Expand sub-assemblies into a multi-level BOM.","title":"Multi Level"},"generate_if_absent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Generate the BOM table if the assembly has none yet (does not change the document).","title":"Generate If Absent"}},"required":["document_id","wvm","wvm_id","element_id"],"title":"get_bill_of_materialsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_companies":{"post":{"operationId":"list_companies","summary":"List the companies (teams and enterprises) your Onshape account belongs to, with id, name and domain prefix. Use for \"Wh","description":"List the companies (teams and enterprises) your Onshape account belongs to, with id, name and domain prefix. Use for \"Which Onshape companies am I part of\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"active_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"Only active companies.","title":"Active Only"}},"title":"list_companiesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_revisions":{"post":{"operationId":"list_revisions","summary":"List released part and drawing revisions of a company: part number, revision letter, release name, state and release dat","description":"List released part and drawing revisions of a company: part number, revision letter, release name, state and release date. Use for \"Which released revisions does my company have in Onshape\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"company_id":{"description":"Company id from list_companies.","maxLength":40,"title":"Company Id","type":"string"},"latest_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Only the latest revision of each part number.","title":"Latest Only"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many records to skip, for paging.","title":"Offset"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many records to return (1 to 100).","title":"Limit"}},"required":["company_id"],"title":"list_revisionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}