Skip to main content
Glama

Get DSBmobile Substitution Entries

get_substitutions
Read-onlyIdempotent

Fetches and parses DSBmobile substitution plans, returning structured entries by class so users can check cancellations, replacements, teachers, periods, rooms, and notes.

Instructions

Fetches and parses the actual substitution plan (Vertretungsplan) pages from DSBmobile, returning structured substitution entries for each class.

Returns a list of substitution plans (one per day), each containing:

  • date: ISO date string (e.g., "2026-03-20")

  • lastUpdated: When the plan was last updated

  • entries: Array of substitution entries, each with:

    • className: The class (e.g., "05b", "Q2_Kra")

    • type: Substitution type (e.g., "Vertretung", "Statt-Vertretung", "Entfall")

    • period: Lesson period(s) (e.g., "3" or "5 - 6")

    • originalTeacher: Abbreviation of the absent teacher

    • substituteTeacher: Abbreviation of the substitute teacher

    • subject: Subject abbreviation (e.g., "SPO", "ETHI", "E")

    • originalRoom: Original room

    • substituteRoom: Substitute room

    • text: Additional notes

Use this tool when:

  • A user asks "Do I have any substitutions today?"

  • A user wants to know which teacher is substituting for whom

  • A user asks "Is lesson X cancelled?"

  • A user wants to filter substitutions by class name

This tool downloads and parses all plan pages, which may take a few seconds. For just the list of plan URLs, use get_timetables instead.

The className parameter is optional. If omitted, the DSB_CLASS environment variable is used as the default filter. If neither is set, all classes are returned. If the filter matches no entries, the plans are still returned with empty entries and totalEntries 0. If no plans are published, plans is an empty list.

Error handling:

  • Returns an error message if authentication fails (check DSB_USERNAME and DSB_PASSWORD)

  • Returns an error message if the DSBmobile service is unavailable

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_substitutions"
  }
}

Input Schema

NameRequiredDescriptionDefault
classNameNoOptional: filter results to a specific class name (e.g. '05b', 'Q2_Kra'). Case-insensitive. Defaults to the DSB_CLASS environment variable if set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description adds genuinely new behavior: it downloads and parses all plan pages so calls may take a few seconds, it documents filter-fallback to DSB_CLASS, empty-result semantics (plans still returned with totalEntries 0), and auth/service error conditions. This is exactly the operational context annotations cannot express.

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

Conciseness4/5

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

Front-loaded with purpose, then return shape, then usage triggers, then caveats — a sensible ordering. The return-field enumeration is long but justified because no output schema exists; only the repeated className default/case-insensitivity slightly duplicates the schema.

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?

With no output schema, the description carries the full burden of documenting return fields and does so field-by-field. Combined with latency, error handling, and empty-state semantics, an agent has everything needed to call and interpret results without further inspection.

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% and the schema already documents className as case-insensitive with an env-var default. The description adds value by spelling out the three-state fallback (param → DSB_CLASS → all classes) and what happens when the filter matches nothing, which the schema does not state.

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 ('Fetches and parses the actual substitution plan (Vertretungsplan) pages') and names the concrete return shape (one plan per day with entries per class). It explicitly distinguishes itself from the sibling get_timetables, which only returns plan URLs.

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?

Provides four explicit 'Use this tool when' triggers with concrete user phrasings ('Do I have any substitutions today?', 'Is lesson X cancelled?'), plus an explicit alternative ('For just the list of plan URLs, use get_timetables instead'). Edge cases where it should still be used (no matches, no plans published) are also specified.

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