Skip to main content
Glama

businessobject-update

Create or update Business Objects in Simplifier platform with proper project assignments and dependency management for accessing connectors and other business objects.

Instructions

#Create or update a Business Object

Attention: When updating dependencies or tags, allways fetch the Business Object resource first to ensure operating on the latest version. Existing dependencies and tags have to be resent when doing an update - otherwise they would be cleared.

Dependencies are REQUIRED to be added when the BO functions access connectors or other BOs using Simplifier.Connector.* or Simplifier.BusinessObject.* APIs.

Project Assignment

Business Objects must be assigned to projects using the project assignment parameters:

For Creating New BOs:

  • Set projectsBefore to empty array []

  • Set projectsAfterChange to array of project names to assign the BO to

For Updating Existing BOs:

  • Set projectsBefore to current project assignments (from existing BO)

  • Set projectsAfterChange to new project assignments

Example:

{ "name": "MyBusinessObject", "projectsBefore": [], "projectsAfterChange": ["ProjectA", "ProjectB"] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
descriptionYes
dependenciesYesArray of dependencies that this BO requires. CRITICAL: Add connectors and other BOs that will be accessed from BO functions using Simplifier.Connector.<Name> or Simplifier.BusinessObject.<Name> syntax. If not provided when updating, existing dependencies will be preserved.
tagsYesArray of tags for categorizing and organizing this Business Object. If not provided when updating, existing tags will be preserved.
projectsBeforeNoProject names before the change. Use empty array [] when creating new BOs, or provide current projects when updating.
projectsAfterChangeNoProject names to assign the BO to. Required for tracking project assignments.

Implementation Reference

  • The handler function for the 'businessobject-update' tool. It checks if the Business Object exists, constructs the details object including project assignments, and calls either createServerBusinessObject or updateServerBusinessObject on the SimplifierClient.
    }, async ({ name, description, dependencies, tags, projectsBefore, projectsAfterChange }) => { return wrapToolResult(`create or update Business Object ${name}`, async () => { const trackingKey = trackingToolPrefix + toolNameBusinessObjectUpdate let oExisting: any; try { oExisting = await simplifier.getServerBusinessObjectDetails(name, trackingKey) } catch { } const data: SimplifierBusinessObjectDetails = { name: name, description: description, dependencies: dependencies, tags: tags, assignedProjects: { projectsBefore: projectsBefore || [], projectsAfterChange: projectsAfterChange || [] } } as SimplifierBusinessObjectDetails if (oExisting) { return simplifier.updateServerBusinessObject(data); } else { return simplifier.createServerBusinessObject(data) } }) });
  • Zod input schema for the 'businessobject-update' tool parameters including name, description, dependencies, tags, and project assignments.
    { name: z.string(), description: z.string(), // defaults have been removed for description, dependencies and tags, so that we can add the existing values, if the properties are // not given at all dependencies: z.array(z.object({ refType: z.enum(['connector', 'serverbusinessobject', 'plugin']).describe('Type of dependency: "connector" for data connectors, "serverbusinessobject" for other Business Objects, "plugin" for Plugins'), name: z.string().describe('name of the connector or server business object (bo) to depend on') })).describe('Array of dependencies that this BO requires. CRITICAL: Add connectors and other BOs that will be accessed from BO functions using Simplifier.Connector.<Name> or Simplifier.BusinessObject.<Name> syntax. If not provided when updating, existing dependencies will be preserved.'), tags: z.array(z.string()).describe('Array of tags for categorizing and organizing this Business Object. If not provided when updating, existing tags will be preserved.'), projectsBefore: z.array(z.string()).default([]).describe('Project names before the change. Use empty array [] when creating new BOs, or provide current projects when updating.'), projectsAfterChange: z.array(z.string()).default([]).describe('Project names to assign the BO to. Required for tracking project assignments.') },
  • Registration of the 'businessobject-update' tool on the McpServer, defining name, description, input schema, metadata, and handler.
    const toolNameBusinessObjectUpdate = "businessobject-update" server.tool(toolNameBusinessObjectUpdate, businessObjectUpdateDescription, { name: z.string(), description: z.string(), // defaults have been removed for description, dependencies and tags, so that we can add the existing values, if the properties are // not given at all dependencies: z.array(z.object({ refType: z.enum(['connector', 'serverbusinessobject', 'plugin']).describe('Type of dependency: "connector" for data connectors, "serverbusinessobject" for other Business Objects, "plugin" for Plugins'), name: z.string().describe('name of the connector or server business object (bo) to depend on') })).describe('Array of dependencies that this BO requires. CRITICAL: Add connectors and other BOs that will be accessed from BO functions using Simplifier.Connector.<Name> or Simplifier.BusinessObject.<Name> syntax. If not provided when updating, existing dependencies will be preserved.'), tags: z.array(z.string()).describe('Array of tags for categorizing and organizing this Business Object. If not provided when updating, existing tags will be preserved.'), projectsBefore: z.array(z.string()).default([]).describe('Project names before the change. Use empty array [] when creating new BOs, or provide current projects when updating.'), projectsAfterChange: z.array(z.string()).default([]).describe('Project names to assign the BO to. Required for tracking project assignments.') }, { title: "Create or update a Business Object", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true }, async ({ name, description, dependencies, tags, projectsBefore, projectsAfterChange }) => { return wrapToolResult(`create or update Business Object ${name}`, async () => { const trackingKey = trackingToolPrefix + toolNameBusinessObjectUpdate let oExisting: any; try { oExisting = await simplifier.getServerBusinessObjectDetails(name, trackingKey) } catch { } const data: SimplifierBusinessObjectDetails = { name: name, description: description, dependencies: dependencies, tags: tags, assignedProjects: { projectsBefore: projectsBefore || [], projectsAfterChange: projectsAfterChange || [] } } as SimplifierBusinessObjectDetails if (oExisting) { return simplifier.updateServerBusinessObject(data); } else { return simplifier.createServerBusinessObject(data) } }) });
  • Top-level call to registerServerBusinessObjectTools within the main registerTools function, which includes the businessobject-update tool registration.
    registerServerBusinessObjectTools(server, simplifier)

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/SimplifierIO/simplifier-mcp'

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