Skip to main content
Glama
cindyloo

Dropbox MCP Server

by cindyloo

get_file_info

Retrieve detailed metadata and properties for any file stored in Dropbox to understand file characteristics, size, and modification details.

Instructions

Get detailed information about a specific file.

Args: file_path: Full path to the file in Dropbox

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
pathYes
sizeYes
modifiedYes
is_folderYes
content_previewNo

Implementation Reference

  • The core handler function for the 'get_file_info' MCP tool. It uses the Dropbox API to retrieve file metadata and constructs a FileInfo object, handling both files and folders.
    @mcp.tool()
    def get_file_info(file_path: str) -> FileInfo:
        """
        Get detailed information about a specific file.
        
        Args:
            file_path: Full path to the file in Dropbox
        """
        if not dropbox_client:
            initialize_dropbox_client()
        
        try:
            metadata = dropbox_client.files_get_metadata(file_path)
            
            if isinstance(metadata, dropbox.files.FileMetadata):
                return FileInfo(
                    name=metadata.name,
                    path=metadata.path_lower,
                    size=metadata.size,
                    modified=metadata.server_modified.isoformat(),
                    is_folder=False
                )
            else:
                return FileInfo(
                    name=metadata.name,
                    path=metadata.path_lower,
                    size=0,
                    modified="",
                    is_folder=True
                )
                
        except Exception as e:
            raise ValueError(f"Failed to get file info for {file_path}: {e}")
  • Pydantic BaseModel used as the return type for get_file_info, defining the schema for file information including name, path, size, modification time, folder status, and optional content preview.
    class FileInfo(BaseModel):
        """File information structure."""
        name: str
        path: str
        size: int
        modified: str
        is_folder: bool
        content_preview: Optional[str] = None
  • Duplicate handler function for the 'get_file_info' tool in dockerfile.py, identical to the one in dropbox_server.py.
    @mcp.tool()
    def get_file_info(file_path: str) -> FileInfo:
        """
        Get detailed information about a specific file.
        
        Args:
            file_path: Full path to the file in Dropbox
        """
        if not dropbox_client:
            initialize_dropbox_client()
        
        try:
            metadata = dropbox_client.files_get_metadata(file_path)
            
            if isinstance(metadata, dropbox.files.FileMetadata):
                return FileInfo(
                    name=metadata.name,
                    path=metadata.path_lower,
                    size=metadata.size,
                    modified=metadata.server_modified.isoformat(),
                    is_folder=False
                )
            else:
                return FileInfo(
                    name=metadata.name,
                    path=metadata.path_lower,
                    size=0,
                    modified="",
                    is_folder=True
                )
                
        except Exception as e:
            raise ValueError(f"Failed to get file info for {file_path}: {e}")
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves 'detailed information' but doesn't specify what that includes (e.g., metadata, permissions, size), whether it requires authentication, has rate limits, or how errors are handled. This leaves significant gaps for a tool that likely interacts with external systems.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with two sentences: one stating the purpose and another explaining the parameter. It's front-loaded with the core functionality, though the parameter explanation could be integrated more smoothly rather than as a separate 'Args:' section.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, it lacks context on behavioral aspects like error handling or system interactions, and with no annotations, it doesn't fully compensate for the schema's 0% description coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal semantics beyond the input schema: it clarifies that 'file_path' is a 'Full path to the file in Dropbox', which provides context not in the schema (which has 0% description coverage). However, it doesn't elaborate on path format, constraints, or examples, leaving the schema to define the parameter type without richer guidance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Get detailed information about a specific file' with a specific verb ('Get') and resource ('file'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_files' or 'read_file' beyond the general concept of retrieving information rather than listing or reading content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'list_files', 'read_file', or 'search_files'. It mentions the 'file_path' parameter but doesn't clarify use cases, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/cindyloo/dropbox-mcp-server'

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