Skip to main content
Glama

get_task

Retrieve a specific task from Union by providing its name, project, and domain to access task details and functionality.

Instructions

Get a union task.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYes
nameYes
projectYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler and registration for 'get_task'. Initializes Flyte and delegates to resources.get_task to fetch and return task details as dict.
    @mcp.tool()
    @require_auth
    async def get_task(name: str, project: str, domain: str, ctx: Context) -> dict:
        """Get a union task."""
        print(f"Getting task {name} in project {project} and domain {domain}")
        _init(project, domain)
        task = await resources.get_task(name, project, domain)
        return task.to_dict()
  • Core helper function that retrieves a Flyte Task using flyte.remote.Task.get and fetches its details.
    async def get_task(
        name: str,
        project: str | None = None,
        domain: str | None = None,
        version: str | None = None,
    ) -> flyte.remote.Task:
        return flyte.remote.Task.get(
            name=name,
            project=project,
            domain=domain,
            version=version,
            auto_version="latest" if version is None else None,
        ).fetch()
  • MCP tool handler and registration for 'get_task' in v1. Uses UnionRemote to fetch task and returns string representation.
    @mcp.tool()
    @require_auth
    def get_task(name: str, project: str, domain: str, ctx: Context) -> str:
        """Get a union task."""
        print(f"Getting task {name} in project {project} and domain {domain}")
        remote = _remote(project, domain)
        task = remote.fetch_task(name=name, project=project, domain=domain)
        return str(task)
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It fails to describe any behavioral traits: it doesn't indicate if this is a read-only operation, what permissions might be required, how errors are handled, or what the response format entails. The description adds no value beyond the minimal purpose statement.

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

Conciseness2/5

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

While concise with a single sentence, the description is under-specified rather than efficiently informative. It lacks front-loaded critical details and wastes its minimal content on a tautological statement that doesn't help the agent understand or use the tool effectively.

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

Completeness2/5

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

Given the complexity (3 required parameters, no annotations, 0% schema coverage) and the presence of an output schema, the description is incomplete. It fails to compensate for the lack of parameter documentation or behavioral context, and while the output schema might cover return values, the description doesn't provide enough information for the agent to invoke the tool correctly or understand its role among siblings.

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

Parameters1/5

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

The schema description coverage is 0%, meaning none of the three required parameters (domain, name, project) are documented in the schema. The description provides no information about these parameters—it doesn't explain what they represent, their expected formats, or how they relate to retrieving a 'union task'. This leaves all parameters completely undocumented.

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

Purpose2/5

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

The description 'Get a union task' is a tautology that essentially restates the tool name 'get_task' with minimal additional meaning. It doesn't specify what 'union task' means or what resource is being retrieved, nor does it distinguish this tool from sibling tools like 'get_execution' or 'list_tasks'. The purpose remains vague and unhelpful for agent selection.

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

Usage Guidelines1/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. There's no mention of prerequisites, context, or comparisons to sibling tools like 'list_tasks' (for listing multiple tasks) or 'run_task' (for executing tasks). This leaves the agent with no usage direction.

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/unionai-oss/union-mcp'

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