Skip to main content
Glama
punkpeye

Postman MCP Generator

update_activity_schedule

Modify start and end times for Adobe Target activities using tenant-specific scheduling parameters to control campaign timing.

Instructions

Update the activity schedule in Adobe Target.

Input Schema

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

Implementation Reference

  • The main handler function `executeFunction` that performs the HTTP PUT request to the Adobe Target API to update the activity schedule.
    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.' }; } };
  • JSON Schema defining the required input parameters for the tool: tenant (string), startsAt (ISO 8601 string), endsAt (ISO 8601 string).
    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'] }
  • lib/tools.js:7-16 (registration)
    The `discoverTools` function dynamically imports the apiTool from each file in toolPaths (including this tool's file), spreading its properties to register the tool.
    export async function discoverTools() { const toolPromises = toolPaths.map(async (file) => { const module = await import(`../tools/${file}`); return { ...module.apiTool, path: file, }; }); return Promise.all(toolPromises); }
  • The path to this tool's implementation file, listed in the toolPaths array used by discoverTools for registration.
    'adobe/adobe-target-admin-ap-is/update-activity-schedule.js'

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