Tvheadend MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TVH_URL | Yes | URL of the Tvheadend instance, for example http://tvheadend.example:9981. | |
| TVH_AUTH | No | Authentication method for Tvheadend, for example digest. | |
| TVH_PASS | Yes | Password for the Tvheadend account. | |
| TVH_USER | Yes | Tvheadend account username. The account needs web-interface access and administrator privileges for DVB administration, plus appropriate video-recorder permissions for DVR work. | |
| TVH_TIMEOUT | No | Request timeout in seconds, for example 30. | |
| TVH_TIMEZONE | No | Timezone used for time handling, for example Europe/Berlin. | |
| TVH_READ_ONLY | No | When true, blocks writes while allowing reads and previews. The example enables TVH_READ_ONLY=true for initial exploration. The code default, if omitted, is false. | false |
| TVH_VERIFY_SSL | No | Whether to verify SSL certificates, for example true. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| tvh_api_readA | Read additional metadata/enum/grid endpoints (e.g. bouquets, EPG grabbers, stream profiles, scanfiles, orbital positions). Mutating endpoints are rejected. API paths are relative without '/api/'; pagination can be supplied in parameters. |
| tvh_apply_maintenance_planA | Apply a reviewed plan from this MCP process; previews by default. Plans expire after 15 minutes and actual executions consume the ID. Invented, expired or stale plans are rejected. Rechecks inventory and node fields, refuses active inputs/subscriptions, and attempts guarded rollback on a partial failure. Keep the returned recovery_snapshot; this is not an atomic transaction/full backup. |
| tvh_assign_epg_sourcesA | Assign advertised EPG source IDs to a channel; add preserves existing sources. Source IDs are enum keys from get_field_options(channel_uuid, 'epggrab'), often module/channel strings rather than UUIDs. Empty replace explicitly clears. |
| tvh_assign_networksA | Assign networks to the exact frontend or satellite-input node that owns the field. For DVB-C/T use frontend.networks. For DVB-S inspect the hardware tree: networks or network_a/network_aa etc. may live on satellite configuration/input nodes. Use field options to match supported network types. 'add' preserves existing assignments, 'replace' replaces them, 'remove' removes only the listed networks. |
| tvh_assign_servicesB | Add, replace or remove a channel's service mappings, preserving others in add mode. |
| tvh_audit_channelsA | Read all channels/services and report duplicate names, HD/SD candidates and problems. Regional names remain distinct. HD suggestions are name hints, not proof that two services carry the same programme. No automatic merging, numbering or deletion. |
| tvh_create_channelC | Create a channel: name, number, services UUID array, tags, EPG settings, etc. |
| tvh_create_channel_tagC | Create a channel tag/group using fields from the channeltag class schema. |
| tvh_create_dvr_profileC | Create a named DVR profile, with storage/padding/retention fields from dvr_config. |
| tvh_create_dvr_ruleA | Create an automatic series/title rule or recurring timer. Inspect the corresponding dvr_autorec/dvr_timerec class schema first; rule times use Tvheadend's native units. Edit/disable rules with update_node, delete them with delete_node. |
| tvh_create_muxA | Create a mux with network-specific tuning fields (symbolrate, FEC, PLP/PLS, etc.). frequency_hz is always Hz: converted to native kHz for DVB-S/S2, Hz for DVB-C/T. Alternatively pass settings.frequency in Tvheadend's NATIVE units. Do not pass both. symbolrate is symbols/second, not ksymbols/second. Inspect mux_schema first. |
| tvh_create_networkA | Create a network using a class/schema from network_types. Pass networkname, enabled and delivery-specific fields such as orbital_pos or scanfile as supported by this build. Existing networks are never silently reused. |
| tvh_create_timerB | Create a manual DVR timer. start_time/stop_time: ISO 8601 with explicit UTC offset. extra accepts recording fields such as start_extra/stop_extra (minutes), pri, comment. Core channel/title/time/profile fields cannot be overridden via extra. |
| tvh_delete_nodeA | Delete a DVB/channel/rule/profile object and possibly dependent objects. For DVR recordings use recording_action instead. Hardware availability is managed by the OS/Tvheadend. Network deletion can cascade to its muxes and services. |
| tvh_diagnose_networkA | Inspect network assignment, scan failures and active inputs without starting a scan. Network/mux counts are paginated; hardware is traversed recursively. A missing assignment or repeated scan failures is reported as evidence, not a guessed diagnosis. |
| tvh_discover_satipB | Trigger Tvheadend's SAT>IP server discovery. Requires SAT>IP client support. |
| tvh_epg_coverageA | Measure time coverage, gaps and description presence for the next 1..168 hours. Defaults to all enabled channels (maximum 500); explicit selection includes disabled channels. Overlapping events are counted once. Incomplete reads report errors rather than claiming full coverage. Does not tune a receiver or prove reception quality. |
| tvh_get_epg_configA | Read global EPG grabber settings and their live metadata, including schedules. |
| tvh_get_field_optionsB | Resolve a field's static or API-backed enum: networks, LNB types, switches, etc. |
| tvh_get_nodeC | Inspect one object's current values and metadata, including advanced/expert fields. |
| tvh_get_schemaA | Get fields/types/defaults/options for a class found via list_classes or hardware_tree. |
| tvh_hardware_treeA | List adapters, frontends, satellite inputs, LNBs, switches, rotors and Unicable nodes. uuid='root' lists adapters; a device UUID lists its children. recursive=true expands children, with their actual UUIDs, settings, descriptions and option metadata. Physical tuners are discovered by Tvheadend/its drivers, not created by this tool. |
| tvh_list_channel_tagsB | List channel groups/tags. Edit membership through channel.tags using update_node. |
| tvh_list_channelsB | List all accessible channels, including disabled ones, with service and EPG mappings. |
| tvh_list_classesA | Discover available Tvheadend class names, optionally filtering name/caption. |
| tvh_list_dvr_profilesB | List DVR profiles, output directories, padding and retention settings. |
| tvh_list_dvr_rulesA | List automatic EPG recording rules (autorec) or recurring clock timers (timerec). |
| tvh_list_epg_modulesA | List native OTA/internal/external grabber modules, UUIDs and enabled status. |
| tvh_list_epg_sourcesB | List EPG source channels, module IDs and existing Tvheadend channel mappings. |
| tvh_list_muxesB | List muxes including scan state/result; optionally filter by network UUID. |
| tvh_list_networksB | List networks with UUID, delivery system, enabled state, scan queue and counts. |
| tvh_list_recordingsB | List DVR entries: upcoming includes active recordings; paginate using total/start. |
| tvh_list_servicesC | List discovered services including disabled/unverified ones, encryption and mappings. |
| tvh_map_servicesA | Start Tvheadend's native service-to-channel mapper for explicit service UUIDs. Optional fields: encrypted, merge_same_name, check_availability, type_tags, etc. Uses service/mapper/save, which starts the mapper; there is no mapper/start API. Empty selection is rejected. Monitor mapper_status and list_channels afterwards. |
| tvh_mapper_statusA | Read service mapper success/failure counters and mapper configuration/options. |
| tvh_mux_schemaB | Read network-specific mux fields, tuning parameters and modulation/FEC enums. |
| tvh_network_typesA | List creatable DVB-S/C/T, ATSC, ISDB and IPTV network classes and their schemas. |
| tvh_plan_channel_mergeA | Preview an explicit channel merge, retaining target name/number and unioning mappings. Source channels are disabled, never deleted. DVR references and bouquet-managed sources block the plan. Regional/name mismatches require explicit verification. Returns a 15-minute plan_id for apply_maintenance_plan; does not change configuration. |
| tvh_plan_network_consolidationA | Preview migration to an existing scanned DVB network, preserving channel UUIDs. Reassign tuner inputs, replace mapped services only by unique ONID/TSID/SID matches, then disable source networks. No object deletion or unsupported mux movement. Different delivery systems/satellite positions and missing matches block execution. |
| tvh_probe_receptionA | Preview or run a bounded service MPEG-TS test (1..30 seconds, at most 64 MiB). Without tuner_uuid, Tvheadend selects the receiver. An explicit frontend UUID temporarily isolates that tuner by disabling all competing enabled frontends. Isolation requires an idle server/no imminent DVR, journals prior settings and restores them on completion, error or cancellation. Save the preview snapshot. Process/host crashes require inspection via reception_recoveries and explicit restore. Active probing is blocked in read-only mode, including GET-only stream tests. |
| tvh_reception_recoveriesA | Read pending tuner-isolation recovery journals for this Tvheadend URL. Normally probes restore settings and remove journals. After a process/host crash, inspect the recorded snapshot and current hardware, then use restore_snapshot. This tool never changes settings or reads files outside the configured state folder. |
| tvh_recording_actionA | stop finishes an active recording; cancel cancels a timer/active recording. remove_files PERMANENTLY DELETES the recording files through Tvheadend's remove endpoint. Use only when the user explicitly requests deletion of recordings. |
| tvh_restore_snapshotA | Restore a snapshot's fields to EXISTING nodes. Default previews the changes. All nodes are validated before the first write. Restore is sequential, not atomic; partial failures report completed/remaining UUIDs. Topology changes can invalidate child UUIDs; prefer restoring only the fields you actually changed. |
| tvh_scan_networksA | Queue a service scan for selected networks; returns immediately. Monitor list_networks.scanq_length and list_muxes.scan_state/scan_result. Scans use tuner capacity. For one mux, update_node with its schema's scan_state. |
| tvh_schedule_recordingC | Record an EPG eventId; config_uuid='' selects Tvheadend's default DVR profile. |
| tvh_search_epgA | Search upcoming EPG programmes; query is a Tvheadend regular expression. Results contain eventId for schedule_recording. Optional EPG-specific grid filters support time bounds; timestamps are Unix seconds. fulltext includes descriptions. |
| tvh_snapshotA | Export selected objects' writable, readable fields as a JSON change snapshot. Save the returned JSON locally. This is NOT a complete Tvheadend backup: it cannot recreate deleted nodes, recordings or hardware; excludes secrets and write-once fields. |
| tvh_statusA | Read server version, active tuners/signals and subscriptions, with permission errors. |
| tvh_stop_mapperB | Stop a running automatic service-to-channel mapping operation. |
| tvh_trigger_epg_grabA | Queue OTA collection or rerun enabled internal grabbers; collection is asynchronous. OTA delay: 1..604800 seconds. Internal grabbers run immediately (delay must be 1). External XMLTV socket imports are not triggered by this endpoint. |
| tvh_update_epg_configA | Update global EPG fields using epggrab/config/save and the running build's schema. Read get_epg_config first. Use the actual cron/OTA/save fields it advertises. This does not install grabbers or upload XMLTV data. |
| tvh_update_epg_moduleB | Configure an installed grabber module, e.g. enabled/priority, using its live fields. |
| tvh_update_nodeA | Update any API-exposed tuner, LNB, DiSEqC, Unicable, network, mux, service, channel, EPG, bouquet or DVR object. Inspect get_node/get_field_options first. Uses actual field IDs and native units, validates unknown/read-only fields, preserves unspecified fields; arrays REPLACE existing arrays. dry_run previews. After satconf/lnb_type/switch_type/en50494_type changes, re-read hardware_tree: child nodes may have been recreated. No hard-coded limits on expert settings. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| workflow | How to configure reception and DVR through this server. |
TDQS
Scored across 53 tools
Many tools are resource/action-specific, but the generic tvh_update_node and tvh_delete_node overlap with specialized tools such as tvh_assign_services, tvh_assign_networks, and tvh_update_epg_config. Other boundaries like create_dvr_rule vs. create_timer and scan_networks vs. diagnose_network/probe_reception are mostly clarified by descriptions, but selection is not always obvious.
All tools consistently use the tvh_ prefix plus snake_case, and most follow a tvh_verb_noun pattern. A few nouns/action-style names such as tvh_status, tvh_hardware_tree, tvh_mapper_status, and tvh_recording_action are minor deviations from the dominant pattern.
At 53 tools, the surface is far beyond the typical 3-15 well-scoped range and lands in the 50+ extreme-mismatch band. Even for a broad Tvheadend backend, the set is large enough to overwhelm an agent, and the generic get/update/API-read tools suggest some specialized tools could be consolidated.
The tool set covers the major Tvheadend lifecycle areas: channels/services, networks/muxes, EPG configuration and sources, DVR profiles/rules/timers/recordings, hardware/adapters, diagnostics, snapshots, and maintenance plans. Generic get_node/update_node/delete_node/api_read also provide fallback coverage where explicit CRUD tools are absent.