sap-system-update
Create or update SAP system configurations for RFC connector targets in Simplifier projects, including system parameters, project assignments, and connection settings.
Instructions
#Create or update a SAP system
SAP Systems are used as the target of RFC connectors.
Attention: When updating tags, allways fetch the SAP system resource first to ensure operating on the latest version. Existing tags have to be resent when doing an update - otherwise they would be cleared.
You can find existing SAP systems with the simplifier://sap-systems resource, and details about a single system with simplifier://sap-system/{systemName}
Project Assignment
SAP systems must be assigned to projects using the project assignment parameters:
For Creating New SAP Systems:
Set
projectsBeforeto empty array[]Set
projectsAfterChangeto array of project names to assign the SAP system to
For Updating Existing SAP Systems:
Set
projectsBeforeto current project assignments (from existing SAP system)Set
projectsAfterChangeto new project assignments
Example:
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| description | Yes | ||
| active | No | enables or disables the SAP system. Should be true, if you want to use the system | |
| instanceRestrictions | Yes | restrict this system to specific Simplifier instances, it isn't transported to unlisted instances. If this is empty, no restriction is applied | |
| systemType | No | The type of your SAP System (e.g. Development, Testing, Production…) | |
| configuration | Yes | ||
| tags | Yes | Array of tags for categorizing and organizing this SAP system. If not provided when updating, existing tags will be preserved. | |
| projectsBefore | No | Project names before the change. Use empty array [] when creating new SAP systems, or provide current projects when updating. | |
| projectsAfterChange | No | Project names to assign the SAP system to. Required for tracking project assignments. |
Implementation Reference
- src/tools/sap-system-tools.ts:78-110 (handler)The asynchronous handler function that implements the core logic of the 'sap-system-update' tool. It checks if the SAP system exists, constructs the SAPSystem data object, and calls either createSapSystem or updateSapSystem on the SimplifierClient.}, async ({ name, description, active, instanceRestrictions, systemType, configuration, tags, projectsBefore, projectsAfterChange }) => { return wrapToolResult(`create or update SAP system ${name}`, async () => { const trackingKey = trackingToolPrefix + toolNameSapSystemUpdate; let oExisting: any; try { oExisting = await simplifier.getSapSystem(name, trackingKey) } catch { } const data: SAPSystem = { name: name, description: description, active: active, instanceRestrictions: instanceRestrictions, systemType: systemType || "", configuration: { ...configuration, sapRouterString: configuration.sapRouterString || "", sncQualityOfProtection: sncProtectionQualities[configuration.sncQualityOfProtection] || 3, }, tags: tags, assignedProjects: { projectsBefore: projectsBefore || [], projectsAfterChange: projectsAfterChange || [] }, permission: { deletable: true, editable: true, }, } if (oExisting) { return simplifier.updateSapSystem(data); } else { return simplifier.createSapSystem(data) } })
- src/tools/sap-system-tools.ts:49-71 (schema)Zod schema defining the input parameters and validation for the 'sap-system-update' tool, including SAP system details, configuration, tags, and project assignments.name: z.string(), description: z.string(), active: z.boolean().describe('enables or disables the SAP system. Should be true, if you want to use the system').default(true), instanceRestrictions: z.array(z.string()).describe("restrict this system to specific Simplifier instances, it isn't transported to unlisted instances. If this is empty, no restriction is applied"), systemType: z.string().describe("The type of your SAP System (e.g. Development, Testing, Production…)").optional(), configuration: z.object({ systemId: z.string().describe("SAP system id"), systemNumber: z.string().describe("SAP system number (00-99)"), clientNumber: z.string().describe("SAP client number (000-999) "), language: z.string().describe("The language in which the SAP system should return translatable values"), applicationServerHostname: z.string().describe("hostname or ip of the application server"), sapRouterString: z.string().describe("The string used to connect via SAP-Router to your SAP System").optional(), sncActive: z.boolean().describe("Enable SNC for the connection"), sncPartner: z.string().describe("the SNC communication partner (e.g. your SAP system)"), sncSsoMode: z.boolean().describe("With this switch you can select to use SNC-SSO (SNC Single Sign On) Mode"), sncQualityOfProtection: z.enum([ "authentication", "integrity+authentication", "privacy+integrity+authentication", "default", "maximum", ]).describe("sets the SNC quality of protection level").optional().default("privacy+integrity+authentication"), }), tags: z.array(z.string()).describe('Array of tags for categorizing and organizing this SAP system. 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 SAP systems, or provide current projects when updating.'), projectsAfterChange: z.array(z.string()).default([]).describe('Project names to assign the SAP system to. Required for tracking project assignments.') },
- src/tools/sap-system-tools.ts:46-111 (registration)The MCP server.tool registration call that defines and registers the 'sap-system-update' tool, including its name, description, input schema, hints, and handler function.server.tool(toolNameSapSystemUpdate, sapSystemUpdateDescription, { name: z.string(), description: z.string(), active: z.boolean().describe('enables or disables the SAP system. Should be true, if you want to use the system').default(true), instanceRestrictions: z.array(z.string()).describe("restrict this system to specific Simplifier instances, it isn't transported to unlisted instances. If this is empty, no restriction is applied"), systemType: z.string().describe("The type of your SAP System (e.g. Development, Testing, Production…)").optional(), configuration: z.object({ systemId: z.string().describe("SAP system id"), systemNumber: z.string().describe("SAP system number (00-99)"), clientNumber: z.string().describe("SAP client number (000-999) "), language: z.string().describe("The language in which the SAP system should return translatable values"), applicationServerHostname: z.string().describe("hostname or ip of the application server"), sapRouterString: z.string().describe("The string used to connect via SAP-Router to your SAP System").optional(), sncActive: z.boolean().describe("Enable SNC for the connection"), sncPartner: z.string().describe("the SNC communication partner (e.g. your SAP system)"), sncSsoMode: z.boolean().describe("With this switch you can select to use SNC-SSO (SNC Single Sign On) Mode"), sncQualityOfProtection: z.enum([ "authentication", "integrity+authentication", "privacy+integrity+authentication", "default", "maximum", ]).describe("sets the SNC quality of protection level").optional().default("privacy+integrity+authentication"), }), tags: z.array(z.string()).describe('Array of tags for categorizing and organizing this SAP system. 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 SAP systems, or provide current projects when updating.'), projectsAfterChange: z.array(z.string()).default([]).describe('Project names to assign the SAP system to. Required for tracking project assignments.') }, { title: "Create or update a SAP system", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true }, async ({ name, description, active, instanceRestrictions, systemType, configuration, tags, projectsBefore, projectsAfterChange }) => { return wrapToolResult(`create or update SAP system ${name}`, async () => { const trackingKey = trackingToolPrefix + toolNameSapSystemUpdate; let oExisting: any; try { oExisting = await simplifier.getSapSystem(name, trackingKey) } catch { } const data: SAPSystem = { name: name, description: description, active: active, instanceRestrictions: instanceRestrictions, systemType: systemType || "", configuration: { ...configuration, sapRouterString: configuration.sapRouterString || "", sncQualityOfProtection: sncProtectionQualities[configuration.sncQualityOfProtection] || 3, }, tags: tags, assignedProjects: { projectsBefore: projectsBefore || [], projectsAfterChange: projectsAfterChange || [] }, permission: { deletable: true, editable: true, }, } if (oExisting) { return simplifier.updateSapSystem(data); } else { return simplifier.createSapSystem(data) } }) });