Skip to main content
Glama

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
NameRequiredDescriptionDefault
file_idYes
template_keyYes

Implementation Reference

  • 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)
  • 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)
  • 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, )

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/box-community/mcp-server-box'

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