send_package_to_integration
Send a MASV package to an integrated cloud or on-prem system like AWS S3, Frame.io, Dropbox, or MASV Storage Gateway. Provide the package ID and integration ID with direction masv_to_cloud.
Instructions
Send MASV package to connected integration. Integration could be cloud or on-prem system like AWS S3, Frame.io, Dropbox, MASV Storage Gateway and many others
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| packageId | Yes | Id of the package that will be transferred to connected integration | |
| integrationId | Yes | Id of the integration to transfer package to. Integration should have direction: masv_to_cloud. |
Implementation Reference
- src/api/integrations.ts:57-82 (handler)The main handler function that sends a package to a connected integration. It constructs a POST request to /v1/packages/{packageId}/transfer with the integration's cloud_connection_id and a package token for authentication.
async function sendPackageToIntegration({ packageId, integrationId, }: SendPackageToIntegrationParams) { const url = new URL(`${MASV_BASE_URL}/v1/packages/${packageId}/transfer`); const packageToken = await getPackageToken(packageId); const headers = { "content-type": "application/json", "x-package-token": packageToken, }; const body = { cloud_connection_id: integrationId, }; const r = await fetch(url.toString(), { method: "POST", headers, body: JSON.stringify(body), }); const data = await r.json(); return data; } - src/api/integrations.ts:42-51 (schema)Zod schema defining the input parameters: packageId (string) and integrationId (string).
const SendPackageToIntegrationSchema = z.object({ packageId: z .string() .describe( "Id of the package that will be transferred to connected integration", ), integrationId: z .string() .describe("Id of the integration to transfer package to. Integration should have direction: masv_to_cloud."), }); - src/index.ts:262-278 (registration)Registration of the 'send_package_to_integration' tool with the MCP server, including its description and input schema, along with the callback that invokes the handler.
server.registerTool( "send_package_to_integration", { description: "Send MASV package to connected integration. Integration could be cloud or on-prem system like AWS S3, Frame.io, Dropbox, MASV Storage Gateway and many others", inputSchema: SendPackageToIntegrationSchema.shape, }, async (args) => { try { const data = await sendPackageToIntegration(args); return mcpOk(data); } catch (error) { return mcpError(error); } }, ); - src/api/integrations.ts:53-55 (helper)TypeScript type inferred from the Zod schema for the sendPackageToIntegration function parameters.
type SendPackageToIntegrationParams = z.infer< typeof SendPackageToIntegrationSchema >; - src/api/integrations.ts:373-374 (helper)Export of the schema and handler for use by the registration site (index.ts).
SendPackageToIntegrationSchema, sendPackageToIntegration,