reorder_node
Reorder nodes in their parent arrays using specific directions or indices in Conduit’s MCP server. Supports batch operations with error-handling options for efficient node management.
Instructions
Reorders one or more nodes in their parents' children arrays. Accepts either a single reorder config (via 'reorder') or an array of configs (via 'reorders'). Optionally, you can provide options such as skip_errors.
Returns:
content: Array of objects. Each object contains a type: "text" and a text field with the results and any errors.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
options | No | Options for the operation (e.g., skip_errors). Optional. | |
reorder | No | A single reorder configuration object. Each object should include nodeId and optional direction or index. | |
reorders | No |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"options": {
"additionalProperties": false,
"description": "Options for the operation (e.g., skip_errors). Optional.",
"properties": {
"skip_errors": {
"description": "If true, skip errors and continue processing remaining operations in batch mode.",
"type": "boolean"
}
},
"type": "object"
},
"reorder": {
"additionalProperties": false,
"description": "A single reorder configuration object. Each object should include nodeId and optional direction or index.",
"properties": {
"direction": {
"description": "The direction to move the node: 'up', 'down', 'front', or 'back'. Optional.",
"enum": [
"up",
"down",
"front",
"back"
],
"type": "string"
},
"index": {
"description": "The new index to move the node to (0-based). Optional.",
"type": "integer"
},
"nodeId": {
"description": "The ID of the node to reorder.",
"type": "string"
}
},
"required": [
"nodeId"
],
"type": "object"
},
"reorders": {
"items": {
"$ref": "#/properties/reorder"
},
"type": "array"
}
},
"type": "object"
}