Skip to main content
Glama
Amit-Lakhani

Postman MCP Generator

by Amit-Lakhani

update_activity_schedule

Modify start and end times for Adobe Target activities to adjust campaign scheduling through API integration.

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 executes the tool logic by making a PUT request to the Adobe Target API to update the activity schedule with provided tenant, startsAt, and endsAt.
    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.' };
      }
    };
  • The schema definition for the tool, including name, description, input parameters (tenant, startsAt, endsAt as strings), 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']
        }
      }
    }
  • lib/tools.js:7-16 (registration)
    The `discoverTools` function registers the tool by dynamically importing the `apiTool` export from the tool's module path listed in toolPaths.
    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);
    }
  • tools/paths.js:1-5 (registration)
    The `toolPaths` array lists the path to this tool's module, enabling its discovery and registration in `discoverTools`.
    export const toolPaths = [
      'adobe/adobe-target-admin-ap-is/update-activity-state.js',
      'adobe/adobe-target-admin-ap-is/update-activity-priority.js',
      'adobe/adobe-target-admin-ap-is/update-activity-schedule.js'
    ];
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Update' which implies a mutation, but doesn't clarify if this requires specific permissions, is destructive, has side effects, or what the response might be. This leaves significant gaps for a tool that modifies data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence with zero wasted words. It is appropriately sized and front-loaded, efficiently conveying the core purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information on behavioral traits, error handling, or what the update entails, which is insufficient for safe and effective use by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear documentation for all three parameters (tenant, startsAt, endsAt). The description adds no additional parameter details beyond what the schema provides, so it meets the baseline of 3 without compensating for any gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Update') and the resource ('activity schedule in Adobe Target'), making the purpose immediately understandable. It distinguishes from sibling tools like 'update_activity_priority' and 'update_activity_state' by specifying the schedule aspect, though it doesn't explicitly contrast them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like the sibling tools. It lacks context about prerequisites, such as needing an existing activity to update, or any exclusions, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/Amit-Lakhani/mcp1'

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