Skip to main content
Glama

Move Artifact

move_artifact

Move artifacts between folders or to root level in Mnemosyne knowledge graphs to reorganize content structure.

Instructions

Move an artifact to a different folder. Set new_parent_id to null to move to root level.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
graph_idYes
artifact_idYes
new_parent_idNo
new_orderNo

Implementation Reference

  • The handler function that executes the move_artifact tool. It authenticates, validates inputs, reads current artifact state from Y.js workspace, updates the parent folder and order using WorkspaceWriter, and returns the updated workspace snapshot.
    async def move_artifact_tool(
        graph_id: str,
        artifact_id: str,
        new_parent_id: Optional[str] = None,
        new_order: Optional[float] = None,
        context: Context | None = None,
    ) -> dict:
        """Move an artifact to a different folder via Y.js."""
        auth = MCPAuthContext.from_context(context)
        auth.require_auth()
    
        if not graph_id or not graph_id.strip():
            raise ValueError("graph_id is required and cannot be empty")
        if not artifact_id or not artifact_id.strip():
            raise ValueError("artifact_id is required and cannot be empty")
    
        try:
            await hp_client.connect_workspace(graph_id.strip())
    
            # Read current artifact state from Y.js
            channel = hp_client._workspace_channels.get(graph_id.strip())
            if channel is None:
                raise RuntimeError(f"Workspace not connected: {graph_id}")
    
            reader = WorkspaceReader(channel.doc)
            current = reader.get_artifact(artifact_id.strip())
    
            if not current:
                raise RuntimeError(f"Artifact '{artifact_id}' not found in graph '{graph_id}'")
    
            # Update artifact with new parent/order via Y.js
            await hp_client.transact_workspace(
                graph_id.strip(),
                lambda doc: WorkspaceWriter(doc).update_artifact(
                    artifact_id.strip(),
                    parent_id=new_parent_id.strip() if new_parent_id else None,
                    order=new_order,
                ),
            )
    
            snapshot = hp_client.get_workspace_snapshot(graph_id.strip())
    
            result = {
                "success": True,
                "artifact_id": artifact_id.strip(),
                "graph_id": graph_id.strip(),
                "new_parent_id": new_parent_id.strip() if new_parent_id else None,
                "workspace": snapshot,
            }
            return result
    
        except Exception as e:
            logger.error(
                "Failed to move artifact",
                extra_context={
                    "graph_id": graph_id,
                    "artifact_id": artifact_id,
                    "error": str(e),
                },
            )
            raise RuntimeError(f"Failed to move artifact: {e}")
  • The @server.tool decorator that registers the move_artifact tool with the FastMCP server, specifying its name, title, and description. The function signature provides the input schema.
    @server.tool(
        name="move_artifact",
        title="Move Artifact",
        description=(
            "Move an artifact to a different folder. "
            "Set new_parent_id to null to move to root level."
        ),
    )
  • Call to register_hocuspocus_tools which includes the move_artifact tool registration in the standalone MCP server.
    register_hocuspocus_tools(mcp_server)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but reveals minimal behavioral traits. It states the tool moves artifacts and allows null parent_id for root, but doesn't disclose permission requirements, whether the move is destructive/reversible, rate limits, or what happens to artifact relationships. For a mutation tool with zero annotation coverage, this is inadequate.

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 extremely concise with two sentences that directly address core functionality and a key parameter nuance. Every word earns its place with zero waste or redundancy.

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?

For a mutation tool with 4 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It doesn't explain return values, error conditions, permission requirements, or how it differs from similar sibling tools like 'move_document' and 'move_folder'.

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 0%, so the description must compensate but only adds meaning for 'new_parent_id' (null moves to root). It doesn't explain 'graph_id', 'artifact_id', or 'new_order' parameters. With 4 parameters total and only 1 partially clarified, this meets the baseline for minimal compensation.

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 ('Move') and resource ('an artifact'), specifying the action of relocating to a different folder. It distinguishes from siblings like 'move_document' and 'move_folder' by focusing on artifacts, but doesn't explicitly contrast with 'rename_artifact' or other artifact-related tools.

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 alternatives like 'move_document', 'move_folder', or 'rename_artifact'. It mentions moving to root level with null parent_id, but offers no context about prerequisites, error conditions, or sibling tool distinctions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/sophia-labs/mnemosyne-mcp'

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