Skip to main content
Glama

get_cronjobs

Retrieve and display all cron jobs with their current status in SAP Commerce Cloud (Hybris) instances for monitoring and management.

Instructions

List all cron jobs and their status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `getCronJobs` method implements the tool logic by executing a FlexibleSearch query on the 'CronJob' type.
    async getCronJobs(): Promise<{ cronJobs: { code: string; active: boolean; status: string }[] }> {
      // Use FlexibleSearch to get cron jobs as HAC doesn't have a direct API
      const result = await this.executeFlexibleSearch(
        "SELECT {code}, {active}, {status} FROM {CronJob} ORDER BY {code}",
        1000
      );
    
      // FlexibleSearch returns resultList as array of arrays, with headers
      if (!this.isFlexSearchResponse(result)) {
        return { cronJobs: [] };
      }
      const resultList = result.resultList || [];
      const headers = result.headers || ['code', 'active', 'status'];
    
      const codeIdx = headers.findIndex(h => h.toLowerCase().includes('code'));
      const activeIdx = headers.findIndex(h => h.toLowerCase().includes('active'));
      const statusIdx = headers.findIndex(h => h.toLowerCase().includes('status'));
    
      return {
        cronJobs: resultList.map((row) => ({
          code: String(row[codeIdx >= 0 ? codeIdx : 0] || ''),
          active: row[activeIdx >= 0 ? activeIdx : 1] === true || row[activeIdx >= 0 ? activeIdx : 1] === 'true',
          status: String(row[statusIdx >= 0 ? statusIdx : 2] || ''),
        })),
      };
  • src/index.ts:258-265 (registration)
    Registration of the 'get_cronjobs' tool in the tool list passed to MCP.
    {
      name: 'get_cronjobs',
      description: 'List all cron jobs and their status',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Handler switch case for 'get_cronjobs' in the main tool execution logic.
    case 'get_cronjobs':
      result = await hybrisClient.getCronJobs();
      break;
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 lists cron jobs and their status, implying a read-only operation, but doesn't disclose behavioral traits like whether it requires authentication, has rate limits, returns paginated results, or what 'status' entails. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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?

The description is a single, efficient sentence that front-loads the core purpose ('List all cron jobs and their status') with zero waste. Every word earns its place, making it highly concise and well-structured for quick comprehension.

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 (0 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks context on behavioral aspects like return format or usage scenarios. Without annotations or output schema, more detail on what 'status' includes would improve completeness, but it's not critically incomplete.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add param info beyond the schema, but with no parameters, the baseline is 4. It appropriately avoids unnecessary details.

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 action ('List') and resource ('all cron jobs and their status'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'trigger_cronjob', but the verb 'List' versus 'trigger' provides implicit distinction. No tautology or misleading elements are present.

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. Sibling tools include 'trigger_cronjob' and 'get_system_info', which might overlap in monitoring contexts, but no explicit when/when-not instructions or prerequisites are mentioned. Usage is implied only by the action 'List'.

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/mcieunic/hybris-mcp-main'

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