Skip to main content
Glama

update_activity_schedule

Modify start and end times for Adobe Target activities using the tenant identifier and ISO 8601 timestamps to ensure accurate scheduling.

Instructions

Update the activity schedule in Adobe Target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endsAtYesThe end time of the activity in ISO 8601 format.
startsAtYesThe start time of the activity in ISO 8601 format.
tenantYesThe tenant identifier.

Implementation Reference

  • The handler function that executes the tool: sends a PUT request to the Adobe Target API to update the activity schedule with new start and end times.
    const executeFunction = async ({ tenant, startsAt, endsAt }) => { const baseUrl = 'https://mc.adobe.io'; const token = process.env.ADOBE_API_KEY; const apiKey = process.env.ADOBE_API_KEY; try { // Construct the URL for the request const url = `${baseUrl}/${tenant}/target/activities/ab/168816/schedule`; // Set up headers for the request const headers = { 'Authorization': `Bearer ${token}`, 'X-Api-Key': apiKey, 'Content-Type': 'application/vnd.adobe.target.v1+json' }; // Prepare the body of the request const body = JSON.stringify({ startsAt, endsAt }); // Perform the fetch request const response = await fetch(url, { method: 'PUT', headers, body }); // Check if the response was successful if (!response.ok) { const errorData = await response.json(); throw new Error(errorData); } // Parse and return the response data const data = await response.json(); return data; } catch (error) { console.error('Error updating activity schedule:', error); return { error: 'An error occurred while updating the activity schedule.' }; } };
  • Schema definition for the tool, including parameters, types, descriptions, and required fields.
    type: 'function', function: { name: 'update_activity_schedule', description: 'Update the activity schedule in Adobe Target.', parameters: { type: 'object', properties: { tenant: { type: 'string', description: 'The tenant identifier.' }, startsAt: { type: 'string', description: 'The start time of the activity in ISO 8601 format.' }, endsAt: { type: 'string', description: 'The end time of the activity in ISO 8601 format.' } }, required: ['tenant', 'startsAt', 'endsAt'] } } }
  • tools/paths.js:4-4 (registration)
    The path to the tool's implementation file is registered here in the list of tool paths used for discovery.
    'adobe/adobe-target-admin-ap-is/update-activity-schedule.js'

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/punkpeye/mcpserveronline'

If you have feedback or need assistance with the MCP directory API, please join our Discord server