Skip to main content
Glama

worklog_guardrail

Read-onlyIdempotent

Worklog/timesheet policy checker - run a batch of worklog entries through configurable guardrails BEFORE posting them to a time-tracking system. Checks: rounding increment (default 0.25h, float-safe), per-entry min/max, per-author daily totals, duplicates, over-estimate alerts (never suggests inflating hours or estimates - flags to PM instead), future dates, weekends, immutable-author edit protection, missing description/ticket. Returns pass/warnings/blocked verdict + per-entry violations with fixes + hour totals by author and date. Caller supplies the reference date - fully deterministic, no LLM.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "entries": "<entries>",
      "today": "<today>"
    },
    "name": "worklog_guardrail"
  }
}

Input Schema

NameRequiredDescriptionDefault
todayYesReference date "YYYY-MM-DD" for future-date checks.
policyNoOptional overrides of the default policy. Unknown keys are rejected.
entriesYesThe entries to check, up to 500.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedInput schema / properties / entries / description
      Previous value: -"Up to 500: [{author, date \"YYYY-MM-DD\", hours, ticket?, description?, estimate_hours?, already_logged_hours?, id?, edit?, delete?, new?}]."New value: +"The entries to check, up to 500."
    • addedInput schema / properties / entries / items / description
      Added value: +"One worklog entry."
    • addedInput schema / properties / entries / items / properties
      Added value: +{
      +  "already_logged_hours": {
      +    "description": "Hours already on the ticket before this entry.",
      +    "type": "number"
      +  },
      +  "author": {
      +    "description": "Who logged it.",
      +    "type": "string"
      +  },
      +  "date": {
      +    "description": "Work date, YYYY-MM-DD.",
      +    "type": "string"
      +  },
      +  "delete": {
      +    "description": "True if this deletes an existing worklog.",
      +    "type": "boolean"
      +  },
      +  "description": {
      +    "description": "What was done.",
      +    "type": "string"
      +  },
      +  "edit": {
      +    "description": "True if this edits an existing worklog.",
      +    "type": "boolean"
      +  },
      +  "estimate_hours": {
      +    "description": "Ticket estimate, for the over-estimate check.",
      +    "type": "number"
      +  },
      +  "hours": {
      +    "description": "Hours logged; must be positive.",
      +    "type": "number"
      +  },
      +  "id": {
      +    "description": "Existing worklog id; on an immutable author this counts as an update.",
      +    "type": "string"
      +  },
      +  "new": {
      +    "description": "True if this is a new entry even though it carries an id.",
      +    "type": "boolean"
      +  },
      +  "ticket": {
      +    "description": "Ticket reference.",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / entries / maxItems
      Added value: +500
    • addedInput schema / properties / entries / minItems
      Added value: +1
    • addedInput schema / properties / policy / additionalProperties
      Added value: +false
    • changedInput schema / properties / policy / description
      Previous value: -"Optional overrides: rounding_increment, max_hours_per_day, max_hours_per_entry, min_hours_per_entry, immutable_authors, require_description, require_ticket, over_estimate_policy (alert|block|ignore), future_dates (block|alert), weekend_policy (allow|alert)."New value: +"Optional overrides of the default policy. Unknown keys are rejected."
    • addedInput schema / properties / policy / properties
      Added value: +{
      +  "future_dates": {
      +    "description": "Default \"block\".",
      +    "enum": [
      +      "block",
      +      "alert"
      +    ],
      +    "type": "string"
      +  },
      +  "immutable_authors": {
      +    "description": "Authors whose existing worklogs must never be edited or deleted.",
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "max_hours_per_day": {
      +    "description": "Per author per day. Default 10.",
      +    "exclusiveMinimum": 0,
      +    "type": "number"
      +  },
      +  "max_hours_per_entry": {
      +    "description": "Default 8.",
      +    "exclusiveMinimum": 0,
      +    "type": "number"
      +  },
      +  "min_hours_per_entry": {
      +    "description": "Default 0.25.",
      +    "exclusiveMinimum": 0,
      +    "type": "number"
      +  },
      +  "over_estimate_policy": {
      +    "description": "Default \"alert\".",
      +    "enum": [
      +      "alert",
      +      "block",
      +      "ignore"
      +    ],
      +    "type": "string"
      +  },
      +  "require_description": {
      +    "description": "Default false.",
      +    "type": "boolean"
      +  },
      +  "require_ticket": {
      +    "description": "Default false.",
      +    "type": "boolean"
      +  },
      +  "rounding_increment": {
      +    "description": "Hours must be a multiple of this. Default 0.25.",
      +    "exclusiveMinimum": 0,
      +    "type": "number"
      +  },
      +  "weekend_policy": {
      +    "description": "Default \"allow\".",
      +    "enum": [
      +      "allow",
      +      "alert"
      +    ],
      +    "type": "string"
      +  }
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, closed-world behavior, and the description corroborates this by framing the tool as a pre-post checker plus adding real context: determinism with a caller-supplied reference date, a 500-entry batch cap, and the explicit stance that it never suggests inflating hours but flags to the PM instead. It stops short of explaining how a verdict escalates from warning to blocked.

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?

Dense but front-loaded: purpose first, then the check inventory, then the return contract, then the determinism note. Every clause carries information an agent would otherwise have to infer, and there is no filler.

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

Completeness4/5

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

For a three-parameter tool with a deeply nested entry object and no output schema, the description supplies the missing return contract (pass/warnings/blocked verdict, per-entry violations with fixes, hour totals by author and date). The only gap is the exact rule that promotes a violation to 'blocked' versus warning, which is only implied by the block/alert enums.

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?

Schema coverage is 100%, so the baseline is 3; the description earns more by mapping checks to policy knobs (rounding increment with float-safety, per-entry min/max, per-author daily totals, immutable-author edit protection) and by disclosing an unconditionally applied duplicate check that has no corresponding policy field. It does not restate the entry-level id/new/edit/delete interplay, leaving that to the schema.

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?

States a specific verb and resource — run a batch of worklog entries through configurable guardrails — and names the domain (worklog/timesheet) precisely enough to separate it from sibling linters like ticket_lint, story_lint, and estimate_sanity. The enumerated checks and 'BEFORE posting' framing make the boundary unmistakable.

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

Usage Guidelines4/5

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

The 'BEFORE posting them to a time-tracking system' clause clearly identifies the pre-flight use case, and the batch framing implies this is for validating many entries at once. It lacks explicit when-not guidance and does not route overlapping cases (e.g. over-estimate checks vs estimate_sanity) to alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.