Skip to main content
Glama

box_ai_ask_hub_tool

Query Box AI to analyze specific hub content and generate responses based on user prompts, enabling AI-driven insights from hub data.

Instructions

Ask Box AI about a specific hub. This tool allows users to query Box AI with a specific prompt, leveraging the content of a hub in Box. The AI processes the hub and generates a response based on the provided prompt. Args: ctx (Context): The context object containing the request and lifespan context. hubs_id (str): The ID of the hub 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. Returns: dict: The response from the AI, containing the answer to the prompt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ai_agent_idNo
hubs_idYes
promptYes

Implementation Reference

  • Main execution handler for the box_ai_ask_hub_tool. It retrieves the Box client from context, calls box_ai_ask_hub with provided parameters, and returns the response.
    async def box_ai_ask_hub_tool( ctx: Context, hub_id: str, prompt: str, ai_agent_id: Optional[str] = None ) -> dict: """ Ask a question about a hub using AI. Args: ctx (Context): The context object containing the request and lifespan context. hub_id (str): The ID of the hub 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_hub( box_client, hub_id, prompt=prompt, ai_agent_id=ai_agent_id ) return response
  • Registers the box_ai_ask_hub_tool function as an MCP tool using the mcp.tool() decorator.
    mcp.tool()(box_ai_ask_hub_tool)
  • Imports the box_ai_ask_hub_tool handler from src/tools/box_tools_ai.py for registration.
    box_ai_ask_hub_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