Skip to main content
Glama

MCP Server Box

MIT License
51
  • Apple
  • Linux
import pytest from box_tools_files import ( box_download_file_tool, box_read_tool, box_upload_file_from_content_tool, box_upload_file_from_path_tool, ) @pytest.mark.asyncio async def test_box_read_tool(ctx): # HAB-1-01.docx = 1728677291168. This file must exists resp = await box_read_tool(ctx, "1728677291168") assert resp is not None assert len(resp) > 0 assert "HAB-1-01" in resp @pytest.mark.skip @pytest.mark.asyncio async def test_box_download_file_tool(ctx): # HAB-1-01.docx = 1728677291168. This file must exists # Invoice-A5555.txt = 1823610366483. This file must exists saved_path, file_content, mime_type = await box_download_file_tool( ctx, "1823610366483" ) assert saved_path is None assert file_content is not None assert mime_type is not None assert len(file_content) > 0 @pytest.mark.skip @pytest.mark.asyncio async def test_box_upload_file_from_path_tool(ctx): # Upload a file from the local filesystem to Box # The file must exists in the local filesystem resp = await box_upload_file_from_path_tool( ctx, "tests/test_files/HAB-1-01.docx", "0" ) assert resp is not None assert isinstance(resp, str) assert len(resp) > 0 assert "HAB-1-01.docx" in resp @pytest.mark.skip @pytest.mark.asyncio async def test_box_upload_file_from_content_tool(ctx): # Upload a file from content to Box resp = await box_upload_file_from_content_tool( ctx, "This is a test content", "test_upload_tool.txt", "0" ) assert resp is not None assert isinstance(resp, str) assert len(resp) > 0

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