generate_usage_agreement
Generate a usage agreement for approved PixelVault assets after human shortlist approval. Provide asset IDs, project details, and license type to auto-create the document.
Instructions
Generate a usage agreement document for approved PixelVault assets. Call after human approval of a shortlist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset_ids | Yes | Approved asset IDs. | |
| project_title | Yes | Production or project title. | |
| production_company | Yes | Production company name. | |
| distribution_platform | Yes | Distribution platforms (e.g. Netflix, Broadcast). | |
| territory | Yes | Distribution territory. | |
| air_date | No | Anticipated air date (YYYY-MM-DD). | |
| license_type | Yes | License type. |
Implementation Reference
- src/index.js:153-174 (handler)The handler function that executes the generate_usage_agreement tool logic. It generates a usage agreement document as a formatted text string using the provided arguments (asset_ids, project_title, production_company, etc.).
async function handleGenerateUsageAgreement(args) { const { asset_ids, project_title, production_company, distribution_platform, territory, air_date, license_type } = args; const today = new Date().toISOString().split('T')[0]; const agreementId = `PV-${Date.now().toString(36).toUpperCase()}`; const text = [ `PIXELVAULT USAGE AGREEMENT`, `Agreement ID: ${agreementId} | Generated: ${today} | Status: DRAFT`, ``, `Production Company: ${production_company}`, `Project: ${project_title}`, `License: ${license_type} | Platform: ${distribution_platform} | Territory: ${territory}`, air_date ? `Air Date: ${air_date}` : null, ``, `Approved Assets (${asset_ids.length}):`, ...asset_ids.map((id, i) => ` ${i + 1}. Asset ID: ${id}`), ``, `All assets sourced from licensed AI platforms (Adobe Firefly, Moonvalley).`, `Complete payment and execute at: ${SITE_URL}`, `Questions: outreach@pixelvaultai.com`, ].filter(l => l !== null).join('\n'); return { content: [{ type: 'text', text }] }; } - src/index.js:81-97 (schema)The tool registration definition with input schema for generate_usage_agreement. Defines required parameters: asset_ids (array of strings), project_title, production_company, distribution_platform, territory, license_type, and optional air_date.
{ name: 'generate_usage_agreement', description: 'Generate a usage agreement document for approved PixelVault assets. Call after human approval of a shortlist.', inputSchema: { type: 'object', properties: { asset_ids: { type: 'array', items: { type: 'string' }, description: 'Approved asset IDs.' }, project_title: { type: 'string', description: 'Production or project title.' }, production_company: { type: 'string', description: 'Production company name.' }, distribution_platform: { type: 'string', description: 'Distribution platforms (e.g. Netflix, Broadcast).' }, territory: { type: 'string', description: 'Distribution territory.' }, air_date: { type: 'string', description: 'Anticipated air date (YYYY-MM-DD).' }, license_type: { type: 'string', enum: ['Film & TV Commercial', 'Editorial', 'Commercial Digital'], description: 'License type.' }, }, required: ['asset_ids', 'project_title', 'production_company', 'distribution_platform', 'territory', 'license_type'], }, }, - src/index.js:180-186 (registration)The registration of the tool handler in the CallToolRequestSchema switch-case. Maps the tool name 'generate_usage_agreement' to its handler function handleGenerateUsageAgreement.
server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { switch (name) { case 'search_assets': return await handleSearchAssets(args); case 'get_asset_details': return await handleGetAssetDetails(args); case 'generate_usage_agreement': return await handleGenerateUsageAgreement(args); - src/index.js:54-98 (registration)The tool list where generate_usage_agreement is registered within the TOOLS array that's returned by ListToolsRequestSchema.
const TOOLS = [ { name: 'search_assets', description: 'Search PixelVault for pre-cleared, commercially licensed AI-generated assets matched to a creative brief. Every asset is sourced from licensed AI platforms (Adobe Firefly, Moonvalley) and carries a compliance-cleared status. Returns a ranked shortlist with compliance status, format, platform, and rationale.', inputSchema: { type: 'object', properties: { brief: { type: 'string', description: 'Natural language description of the visual asset needed.' }, license_type: { type: 'string', enum: ['Film & TV', 'Editorial', 'Commercial'], description: 'License type required. Auto-detected from brief if omitted.' }, format: { type: 'string', enum: ['video', 'image'], description: 'Asset format filter.' }, vertical: { type: 'string', description: 'Vertical: post production, editorial, or ecommerce.' }, territory: { type: 'string', description: 'Distribution territory (e.g. Worldwide, US Only).' }, }, required: ['brief'], }, }, { name: 'get_asset_details', description: 'Get full metadata and compliance documentation for a specific PixelVault asset by ID.', inputSchema: { type: 'object', properties: { asset_id: { type: 'string', description: 'The asset ID returned by search_assets.' }, }, required: ['asset_id'], }, }, { name: 'generate_usage_agreement', description: 'Generate a usage agreement document for approved PixelVault assets. Call after human approval of a shortlist.', inputSchema: { type: 'object', properties: { asset_ids: { type: 'array', items: { type: 'string' }, description: 'Approved asset IDs.' }, project_title: { type: 'string', description: 'Production or project title.' }, production_company: { type: 'string', description: 'Production company name.' }, distribution_platform: { type: 'string', description: 'Distribution platforms (e.g. Netflix, Broadcast).' }, territory: { type: 'string', description: 'Distribution territory.' }, air_date: { type: 'string', description: 'Anticipated air date (YYYY-MM-DD).' }, license_type: { type: 'string', enum: ['Film & TV Commercial', 'Editorial', 'Commercial Digital'], description: 'License type.' }, }, required: ['asset_ids', 'project_title', 'production_company', 'distribution_platform', 'territory', 'license_type'], }, }, ];