box_metadata_delete_instance_on_file_tool
Remove metadata instances from files on Box using the MCP Server Box. Specify the file ID and template key to delete metadata directly via the Box API.
Instructions
Delete a metadata instance on a file.
Args: ctx (Context): The context object containing the request and lifespan context. file_id (str): The ID of the file to delete the metadata from. template_key (str): The key of the metadata template.
Returns: dict: The response from the Box API after deleting the metadata.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ||
| template_key | Yes |
Implementation Reference
- src/tools/box_tools_metadata.py:205-222 (handler)The handler function for the box_metadata_delete_instance_on_file_tool. It retrieves the Box client from the context and delegates to the core box_metadata_delete_instance_on_file function from the box_ai_agents_toolkit library.async def box_metadata_delete_instance_on_file_tool( ctx: Context, file_id: str, template_key: str, ) -> dict: """ Delete the metadata template instance associated with a specific file. Args: ctx (Context): The context object containing the request and lifespan context. file_id (str): The ID of the file to delete the metadata from. template_key (str): The key of the metadata template. Returns: dict: The response from the Box API after deleting the metadata. """ box_client = get_box_client(ctx) return box_metadata_delete_instance_on_file(box_client, file_id, template_key)
- src/tool_registry/metadata_tools.py:15-24 (registration)The registration function where box_metadata_delete_instance_on_file_tool is registered using mcp.tool() decorator among other metadata tools.def register_metadata_tools(mcp: FastMCP): mcp.tool()(box_metadata_template_create_tool) mcp.tool()(box_metadata_template_list_tool) mcp.tool()(box_metadata_template_get_by_key_tool) mcp.tool()(box_metadata_template_get_by_name_tool) mcp.tool()(box_metadata_set_instance_on_file_tool) mcp.tool()(box_metadata_get_instance_on_file_tool) mcp.tool()(box_metadata_update_instance_on_file_tool) mcp.tool()(box_metadata_delete_instance_on_file_tool)
- src/tool_registry/metadata_tools.py:3-12 (registration)Import statement in the registry module that brings in the box_metadata_delete_instance_on_file_tool for registration.from tools.box_tools_metadata import ( box_metadata_delete_instance_on_file_tool, box_metadata_get_instance_on_file_tool, box_metadata_set_instance_on_file_tool, box_metadata_template_create_tool, box_metadata_template_get_by_key_tool, box_metadata_template_get_by_name_tool, box_metadata_template_list_tool, box_metadata_update_instance_on_file_tool, )