Skip to contents

Create a package

create_mordew()
Create a mordew package
add_tool()
Add a tool
add_resource()
Add a resource
add_prompt()
Add a prompt
add_skill()
Add a skill
add_mcp_client_config()
Add the Claude Code configuration file
get_mordew_wd()
The folder of the package being developed
install_dev_deps()
Install the development dependencies
registry_roclet()
Roclet generating the tool registry

Types of parameters and form fields

Return values

MCP Apps

widget_page()
The page that draws the widget of a tool

While a function runs

report_progress()
Report the progress of a call
log_message()
Send a log message to the client
notify_resource_updated()
Tell the clients that a resource changed
trace_context()
Get the OpenTelemetry trace context of the request
ask() input_form() input_sample() input_roots() can_ask()
Ask the client while a tool, a resource or a prompt runs
elicit_url()
Ask the user to open a web page before the call can go on

Serve

run_mcp_server()
Run an MCP server
mcp_server() mcp_tool() mcp_resource() mcp_prompt()
Write an MCP server in code
mcp_client_config()
Configure an MCP client for the package

Try and test

call_tool()
Call a tool through an MCP client
read_resource()
Read a resource through an MCP client
get_prompt()
Get a prompt through an MCP client
mcp_client() mcp_request() mcp_close()
Talk to an MCP server over stdio
run_dev()
Try the tools with a model
expect_tool_schema()
Expect a tool definition to match its snapshot
expect_tool_error()
Expect a tool to return an error result
expect_resource()
Expect a resource to be read through an MCP client
expect_prompt()
Expect a prompt to be got through an MCP client
expect_structured_output()
Expect a tool to return structured content that matches its output schema
expect_hostile_safe()
Expect a tool to answer extreme arguments
expect_conformance()
Expect a package to pass the official MCP conformance suite
check_tools()
Check the tools for calls that run code

Evals

use_evals()
Set up the evals
eval_case()
Describe an eval case
tool_call()
Describe a tool call
partial()
Accept part of an expected argument
run_evals()
Run eval cases
assert_pass_rate()
Stop when a case fails too often

Deploy

add_dockerfile()
Add a Dockerfile
add_connect()
Add the Posit Connect file