Skip to main content
Glama
Emenowicz

Hybris MCP Server

by Emenowicz

get_cronjobs

List and check the status of all cron jobs in SAP Commerce Cloud (Hybris) instances for system administration and monitoring.

Instructions

List all cron jobs and their status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function implementing get_cronjobs tool logic by executing FlexibleSearch query for CronJob items and processing results into structured format.
    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)
    MCP tool registration defining the get_cronjobs tool name, description, and input schema (no parameters required).
    {
      name: 'get_cronjobs',
      description: 'List all cron jobs and their status',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Tool dispatching handler in MCP server that invokes the HybrisClient.getCronJobs method upon tool call.
    case 'get_cronjobs':
      result = await hybrisClient.getCronJobs();
      break;
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 lists cron jobs and their status, implying a read-only operation, but doesn't cover critical aspects like whether it requires specific permissions, how it handles errors, if it includes all cron jobs or only active ones, or what the output format looks like. This leaves significant gaps in understanding the tool's 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, clear sentence that directly states the tool's function without any unnecessary words. It is front-loaded with the core action ('List all cron jobs and their status'), making it efficient and easy to parse. Every word earns its place by conveying essential information.

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 lack of annotations and output schema, the description is incomplete for a tool that likely returns complex data (cron jobs and their status). It doesn't explain what 'status' entails (e.g., running, scheduled, failed), the scope of 'all' (e.g., system-wide, user-specific), or the response structure. For a read operation with no structured output, more context is needed to use the tool effectively.

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 parameter details beyond the schema, but since there are no parameters, this is acceptable. A baseline of 4 is appropriate as the description doesn't need to compensate for any schema gaps.

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 with a specific verb ('List') and resource ('cron jobs and their status'), making it immediately understandable. However, it doesn't distinguish this tool from potential siblings like 'trigger_cronjob' or 'get_system_info', which might also involve cron job operations, leaving some ambiguity about its unique role.

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. For example, it doesn't specify if this is for monitoring status, debugging, or if other tools like 'trigger_cronjob' or 'get_system_info' should be used for related tasks. This lack of context makes it harder for an agent to choose appropriately among siblings.

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

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