Skip to main content
Glama

box_ai_ask_file_single_tool

Query Box AI to analyze a specific file and generate responses based on a provided prompt. Use this tool to extract insights or answers directly from file content stored in Box.

Instructions

Ask Box AI about a single file. This tool allows users to query Box AI with a specific prompt, leveraging the content of a single file stored in Box. The AI processes the file and generates a response based on the provided prompt. Args: ctx (Context): The context object containing the request and lifespan context. file_id (str): The ID of the file to be analyzed by the AI. prompt (str): The prompt or question to ask the AI. ai_agent_id (Optional[str]): The ID of the AI agent to use for processing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ai_agent_idNo
file_idYes
promptYes

Implementation Reference

  • The main handler function that implements the box_ai_ask_file_single_tool logic. It retrieves a Box client from context, calls the underlying box_ai_ask_file_single function, and returns the response.
    async def box_ai_ask_file_single_tool( ctx: Context, file_id: str, prompt: str, ai_agent_id: Optional[str] = None ) -> dict: """ Ask a question about a file using AI. Args: ctx (Context): The context object containing the request and lifespan context. file_id (str): The ID of the file to ask about, example: "1234567890". prompt (str): The question to ask. ai_agent_id (Optional[str]): The ID of the AI agent to use for the question. If None, the default AI agent will be used. Returns: dict: The AI response containing the answer to the question. """ box_client = get_box_client(ctx) response = box_ai_ask_file_single( box_client, file_id, prompt=prompt, ai_agent_id=ai_agent_id ) return response
  • The registration of the box_ai_ask_file_single_tool using mcp.tool() decorator in the AI tools registry.
    mcp.tool()(box_ai_ask_file_single_tool)
  • Import of the box_ai_ask_file_single_tool handler from src/tools/box_tools_ai.py.
    box_ai_ask_file_single_tool,

Other Tools

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

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