NAME
Langertha::Raider::MCP::Resources - Internal MCP resources of the configured servers: list/read tools and @server:uri mentions
VERSION
version 0.504
SYNOPSIS
# Internal to Langertha-Raider -- no API promise.
my $res = Langertha::Raider::MCP::Resources->new(
servers => sub { $mcp->clients }, # the connected-or-not configured servers
loop => $loop,
);
my $server = $res->tool_server; # list_mcp_resources, read_mcp_resource
my @blocks = $res->attachments('Compare @docs:file:///api.md with the code');
DESCRIPTION
Internal module. Its interface may change without notice.
What raider does with the resources of the configured MCP servers (ADR 0029 Addendum 1), the way Claude Code does:
The tools
list_mcp_resources(Claude Code:ListMcpResourcesTool) andread_mcp_resource(ReadMcpResourceTool) of "tool_server", which the application mounts when servers are configured. Both read only; a server that announced noresourcescapability has none to list.@server:scheme://pathin a prompt ("attachments"): the resource is read and attached to the prompt as two<system-reminder>blocks, as a read ofread_mcp_resourcewould show it. The server is named as in the configuration (a plugin's serverplugin:NAME:SERVER) or by the server part of its tool names. A reference that names no connected server with resources, or a resource that cannot be read, stays text.
The servers are started by the run ("start_f" in Langertha::Raider::MCP) before a prompt is expanded.
servers
sub { return \@servers }: the Langertha::Raider::MCP::Server objects, asked on every use (they change with /reload). Required.
loop
The IO::Async::Loop awaited on while a tool or an expansion runs. Required.
list
my $items = $res->list; # all servers
my $items = $res->list('docs'); # one
Every resource of the connected servers as { server, uri, name, mimeType, description }. Croaks (with the available servers) for a server name that is not configured.
read
my $text = $res->read( 'docs', 'file:///api.md' );
The text of a resource: the text of every content item, a binary item (blob) as a note with its size and type. Dies with a message for an unknown server, a server without resources or a failing read.
attachments
my @blocks = $res->attachments($prompt);
For each distinct @server:scheme://path of the prompt that names a connected server with resources and can be read: the two <system-reminder> blocks of an attachment, as one string. The path ends at whitespace; sentence punctuation at the end is tried off when the whole does not read.
tool_server
my $server = $res->tool_server;
An MCP::Server with list_mcp_resources(server?) and read_mcp_resource(server, uri), built once. The first answers with a JSON list (or a note that there are none), the second with the text of the resource; failures are error results.
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.