Skip to main content
Glama
Amit-Lakhani

Postman MCP Generator

by Amit-Lakhani

update_activity_state

Modify the status of an Adobe Target activity by specifying a tenant and new state to control campaign execution.

Instructions

Update the state of an activity in Adobe Target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tenantYesThe tenant identifier.
stateYesThe new state to set for the activity.

Implementation Reference

  • Handler function that executes the tool: sends PUT request to Adobe Target API to update activity state for a given tenant.
    const executeFunction = async ({ tenant, state }) => {
      const baseUrl = 'https://mc.adobe.io';
      const apiKey = process.env.ADOBE_API_KEY;
      const token = process.env.ADOBE_API_KEY;
    
      try {
        // Construct the URL for the request
        const url = `${baseUrl}/${tenant}/target/activities/ab/168816/state`;
    
        // Set up headers for the request
        const headers = {
          'Authorization': `Bearer ${token}`,
          'X-Api-Key': apiKey,
          'Content-Type': 'application/vnd.adobe.target.v1+json'
        };
    
        // Set up the body of the request
        const body = JSON.stringify({ state });
    
        // 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 state:', error);
        return { error: 'An error occurred while updating the activity state.' };
      }
    };
  • Tool definition including schema for input parameters (tenant, state), description, and reference to handler function.
    const apiTool = {
      function: executeFunction,
      definition: {
        type: 'function',
        function: {
          name: 'update_activity_state',
          description: 'Update the state of an activity in Adobe Target.',
          parameters: {
            type: 'object',
            properties: {
              tenant: {
                type: 'string',
                description: 'The tenant identifier.'
              },
              state: {
                type: 'string',
                description: 'The new state to set for the activity.'
              }
            },
            required: ['tenant', 'state']
          }
        }
      }
    };
  • lib/tools.js:7-16 (registration)
    Dynamic tool discovery and registration: imports apiTool from each tool file listed in toolPaths and collects them into an array of tools.
    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);
    }
  • mcpServer.js:102-104 (registration)
    Loads the discovered tools in the MCP server main entry point.
    const tools = await discoverTools();
    console.log("🧰 Tools discovered:", tools.map(t => t.definition?.function?.name));
  • Lists paths to all tool implementation files, used by 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'
    ];

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
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 this is an update operation, implying mutation, but doesn't cover critical aspects like required permissions, whether the change is reversible, error handling, or rate limits. This is inadequate for a mutation tool with zero annotation coverage.

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, efficient sentence with zero waste. It's front-loaded with the core action and resource, making it easy to parse quickly, which is ideal for conciseness.

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 this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns, error conditions, or behavioral traits like side effects. For a tool that changes system state, more context is needed to guide safe and effective use.

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?

Schema description coverage is 100%, so the schema already documents both parameters (tenant and state). The description doesn't add any meaning beyond what the schema provides, such as explaining what 'state' values are valid or how 'tenant' relates to the activity. Baseline 3 is appropriate when the schema does the heavy lifting.

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 verb ('Update') and resource ('state of an activity in Adobe Target'), making the purpose understandable. However, it doesn't differentiate this tool from its siblings (update_activity_priority and update_activity_schedule), which also update activity attributes, so it doesn't reach the highest score.

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 its siblings or alternatives. It lacks context about prerequisites, such as needing an existing activity, and doesn't mention when-not-to-use scenarios, 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.