API Reference
Complete reference for the Metapad MCP API tools.
mutation
add_allowed_connectionv1.0Define an allowed connection pattern between node types for a relationship type. All three (relationship type, source node type, target node type) must already exist in the metamodel. Use get_metamodel to check existing types.
add_node_typev1.0Add a new node type (entity type) to the metamodel. Do this before creating nodes of that type. You can define custom properties with data types.
add_relationship_typev1.0Add a new relationship type to the metamodel. After creating it, use add_allowed_connection to specify which node types can be connected with it.
add_relationships_to_diagramv1.0Auto-show all relationships between elements already placed on a diagram. For model diagrams shows M1 relationships; for metamodel diagrams shows allowed connections. Applied immediately.
add_to_diagramv1.0Add nodes or node types to a diagram with auto-grid layout. For model diagrams use node IDs or auto-IDs (e.g. REQ-1); for metamodel diagrams use node type IDs. Applied immediately.
create_diagramv1.0Create a new diagram for visualizing model elements. Use diagram_type 'metamodel' for M2 type diagrams, 'model' for M1 instance diagrams. Applied immediately.
create_filterv1.0Create a stored filter with a composable expression. Expressions: {"OfType":{"type_id":"<id>"}}, {"HasTag":{"tag":"foo"}}, {"NameMatches":{"operator":"Contains","value":"foo"}}, {"And":[...]}, {"Or":[...]}, {"Not":expr}, {"InFolder":{"folder_id":"<id>","recursive":true}}, or "All". Applied immediately.
create_folderv1.0Create a new folder for organizing model elements. Use layer 'metamodel' for node/relationship type folders, 'model' for node/relationship/diagram folders. Applied immediately.
create_nodesv1.0Create new node instances. Node type must already exist in the metamodel (use get_metamodel to check, or add_node_type to create). Changes are applied immediately and broadcast to all connected browser users in real-time.
3 parameter(s)
create_relationshipsv1.0Create relationships between existing nodes. Both source and target must exist. The relationship type must exist in the metamodel and have an allowed connection defined for the given source/target node types.
delete_diagramv1.0Delete a diagram and all its element placements. Does NOT delete the underlying nodes or relationships — only the visual representation. Applied immediately.
delete_filterv1.0Delete a stored filter. Does not delete any model data. Applied immediately. Accepts filter ID or name.
delete_nodesv1.0Delete one or more nodes. By default, all connected relationships are also deleted (cascade). Set cascade_relationships to false to fail if the node has any relationships.
2 parameter(s)
delete_relationshipsv1.0Delete one or more relationships by their IDs. Use get_relationships to find the relationship IDs first.
merge_nodesv1.0Merge duplicate nodes into a single node. All relationships from merged nodes are redirected to the kept node. The merged nodes are then deleted. Use find_similar_nodes to identify candidates.
1 parameter(s)
move_to_folderv1.0Move model elements into a folder (or to root by omitting folder_id). Supports nodes, relationships, node types, relationship types, diagrams, and folders. Applied immediately.
remove_allowed_connectionv1.0Remove an allowed connection constraint, revoking permission for a relationship type to connect specific node type pairs. Applied immediately.
remove_from_diagramv1.0Remove nodes or node types from a diagram. Also removes connected relationship visualizations on that diagram. Does NOT delete the underlying elements. Applied immediately.
remove_node_typev1.0Remove a node type from the metamodel. Also cascades to remove all M1 instances of that type and their relationships. Applied immediately. Use with caution — cannot be undone via MCP.
remove_relationship_typev1.0Remove a relationship type from the metamodel. Also removes all relationships of that type from M1. Applied immediately. Use with caution.
rename_folderv1.0Rename an existing folder and optionally update its description. Applied immediately.
update_diagramv1.0Update an existing diagram's name or description. Applied immediately. Accepts diagram ID or name.
update_modelv1.0Update the model's top-level name or description. Applied immediately.
update_node_typev1.0Update an existing node type: rename, recolor, change description, or add new properties. Applied immediately and broadcast to all connected users.
update_nodesv1.0Update labels, descriptions, or properties on existing nodes. Use set_label/set_description to update core fields, set_properties for key-value pairs, and remove_properties to clear values. Node IDs accept both UUIDs and auto-IDs (e.g. REQ-42).
1 parameter(s)
update_relationship_typev1.0Update an existing relationship type: rename, recolor, change description, or add new properties. Applied immediately and broadcast to all connected users.
update_relationshipsv1.0Update labels, descriptions, or properties on existing relationships. Applied immediately and broadcast to all connected users. Relationship IDs accept both UUIDs and auto-IDs (e.g., "CON-5").
update_tagsv1.0Update tags on any model element (node, relationship, node type, relationship type, diagram, or folder). Replaces all existing tags. Applied immediately.
read
find_similar_nodesv1.0Find nodes with similar names that might be duplicates. Uses string similarity matching. Useful before creating new nodes to avoid duplication.
3 parameter(s)
get_metamodelv1.0Get the model's schema (metamodel). Returns all node types, relationship types, their properties, allowed connections, and instance counts. Always call this first to understand what the model contains.
1 parameter(s)
get_node_detailsv1.0Get complete details for one or more nodes by their IDs. Returns all properties, description, and metadata. Accepts both UUIDs and auto-IDs (e.g. REQ-42).
2 parameter(s)
get_relationshipsv1.0Find relationships (connections) between nodes. Filter by relationship type, source node, target node, or node types. Source and target IDs accept both UUIDs and auto-IDs (e.g. REQ-42).
7 parameter(s)
get_statisticsv1.0Get model-wide statistics: node and relationship counts by type, most connected nodes, and property completeness. Useful for a quick model overview.
1 parameter(s)
search_nodesv1.0Search for nodes (instances) in the model. Filter by type, name, description, property values, or folder. Returns summaries — use get_node_details for full information.
8 parameter(s)