Skip to main content
Glama

get_job_status

Retrieve the current status and completed result of a SPARKIT job by providing its job ID. Use this to check if a prior research task has finished or to revisit a previous result.

Instructions

Fetch the current status (and result if done) of a SPARKIT job.

Use this when research returned before the job finished, or to revisit a previous result by id.

Args: job_id: The id returned by a prior research call.

Returns the cited Markdown report if the job has completed, a status line if it's still running, or a failure message otherwise.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool handler for get_job_status. Fetches job by ID via SparkitClient and returns the Markdown report (if completed), failure message (if failed/cancelled), or a status line (if still running).
    @mcp.tool()
    async def get_job_status(job_id: str) -> str:
        """Fetch the current status (and result if done) of a SPARKIT job.
    
        Use this when ``research`` returned before the job finished, or to
        revisit a previous result by id.
    
        Args:
            job_id: The id returned by a prior ``research`` call.
    
        Returns the cited Markdown report if the job has completed, a status
        line if it's still running, or a failure message otherwise.
        """
        if not job_id or not job_id.strip():
            return "Error: `job_id` is required."
    
        try:
            async with SparkitClient() as client:
                job = await client.get_job(job_id.strip())
        except SparkitAPIError as e:
            return _format_api_error(e)
    
        if job.status == "completed":
            return _format_completed(job)
        if job.status in {"failed", "cancelled"}:
            return _format_terminal_failure(job)
        return f"Job `{job.job_id}` is currently {job.status}."
Behavior4/5

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

Describes return outcomes (completed report, running status, failure message). No annotations, but behavior is well-covered. Lacks explicit statement of non-destructiveness.

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

Conciseness5/5

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

Concise, front-loaded, each sentence adds value. Structured into purpose, usage, argument, returns. No wasted words.

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

Completeness5/5

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

Covers all necessary aspects for a simple tool: usage, parameter, return behavior. Output schema exists, so description suffices.

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 description explains job_id as 'The id returned by a prior `research` call', adding meaning beyond schema's title 'Job Id'. Schema coverage 0%, so description compensates.

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

Purpose5/5

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

Clearly states 'Fetch the current status (and result if done) of a SPARKIT job', specifying verb and resource. Distinguishes from sibling 'research' by context.

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

Usage Guidelines5/5

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

Explicitly says 'Use this when `research` returned before the job finished, or to revisit a previous result by id', providing clear when-to-use and alternative.

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/SPARKIT-science/sparkit-mcp'

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