NAME
Langertha::Raider::SkillTools - Internal MCP::Server factory with the skill tool (load a skill on demand)
VERSION
version 0.504
DESCRIPTION
Internal module. Its interface may change without notice.
The skill tool of ADR 0019 §4: an MCP::Server with one tool, skill(skill, args?), that loads a skill of a Langertha::Raider::Context::Skills catalogue the way Claude Code's Skill tool does (ADR 0026): the result is Launching skill: NAME, and the skill -- Base directory for this skill: DIR, then the body without frontmatter, $ARGUMENTS replaced (see "tool_text" in Langertha::Raider::Context::Skills) -- goes under the raider/messages key of the result's _meta, so the raid adds it as a user message of its own after the tool results ("TOOL RESULTS THAT ADD MESSAGES" in Langertha::Raider). The system prompt lists the skills ("prompt_text" in Langertha::Raider::Context::Skills); the tool loads one. Mount it only when the catalogue lists at least one skill.
build_skill_tools_server
my $server = Langertha::Raider::SkillTools::build_skill_tools_server(
skills => $catalogue, # Langertha::Raider::Context::Skills
render => sub { my ( $entry, $args ) = @_; ...; return { text => $text } }, # optional
);
Returns an MCP::Server with the tool skill. A name the catalogue does not know, or a skill that is not model-invocable (disable-model-invocation: true), is the error result <tool_use_error>Unknown skill: NAME. Available skills: ...</tool_use_error> -- Claude Code's words and frame, then the listed skills. Croaks without skills.
render loads the entry's text: called with the catalogue entry and the args, it returns { text => ... }, or { error => ... } -- then the tool result is that error and nothing is loaded. The application passes "skill_tool_text" in Langertha::Raider::Application, which renders through Langertha::Raider::SlashCommand (ADR 0030 §2: placeholders and !`cmd`). Without it the text is "tool_text" in Langertha::Raider::Context::Skills.
SEE ALSO
SUPPORT
Issues
Please report bugs and feature requests at https://github.com/Getty/langertha-raider/issues.
IRC
Join #langertha on irc.perl.org or message Getty directly.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.