Skip to main content
Glama

get_current_workspace

Retrieve details about the current Prefect workspace to identify active workflow automation environment and available resources.

Instructions

Get the current workspace.

Returns: Details of the current workspace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'get_current_workspace' tool handler function. Decorated with @mcp.tool, it uses the Prefect client to read the current workspace and returns its details as text content, with fallback for local instances.
    @mcp.tool
    async def get_current_workspace() -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        """
        Get the current workspace.
        
        Returns:
            Details of the current workspace
        """
        try:
            async with get_client() as client:
                workspace = await client.read_workspace()
                
                return [types.TextContent(type="text", text=str(workspace.dict()))]
        except Exception as e:
            # For local Prefect instances, workspace APIs may not be available
            return [types.TextContent(
                type="text",
                text="Workspaces are only available in Prefect Cloud. This appears to be a local Prefect instance."
            )]
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool returns 'Details of the current workspace' but doesn't specify what those details include, whether authentication is required, if there are rate limits, or how 'current' is determined. This leaves significant behavioral aspects undocumented.

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 brief and front-loaded with the core purpose. The two-sentence structure is efficient, though the 'Returns:' section could be integrated more smoothly. No wasted words, but minimal elaboration.

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 0 parameters and no output schema, the description provides basic completeness by stating what the tool does and what it returns. However, for a tool with siblings that fetch workspace data in different ways, more context about what makes this tool unique would be valuable. The lack of annotations means the description should do more to explain behavioral aspects.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage. The description appropriately doesn't discuss parameters since none exist. It adds value by mentioning the return type ('Details of the current workspace'), which is helpful given the lack of output schema.

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

Purpose3/5

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

The description states the tool's purpose as 'Get the current workspace', which is a clear verb+resource combination. However, it doesn't distinguish this tool from sibling tools like 'get_workspace', 'get_workspace_by_handle', or 'get_workspaces', leaving ambiguity about when to use this specific tool versus those alternatives.

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 its siblings. While it mentions 'current workspace', it doesn't clarify if this refers to the authenticated user's default workspace, the most recently accessed workspace, or another context. No alternatives or exclusions are mentioned.

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/allen-munsch/mcp-prefect'

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