fn(arguments$0, request$1) =>
#read_mcp_account<@definy.service-io>({
then: fn(account$2) =>
match $2 {
#none(_) =>
@definy.mcp-text(
text: "Writing is disabled on this server: set the secrets DEFINY_MCP_ACCOUNT_SECRET_KEY and DEFINY_MCP_ACCOUNT_NAME (docs/mcp.md)"
),
#some(found$3) =>
@definy.read-account-created(
account_id: $3.account_id,
offset: 0,
then: fn(created$4) =>
@definy.mcp-text(
text: @std.string-join(
items: [
"account id: ",
$3.account_id,
"\naccount name: ",
$3.account_name,
"\ncreated on this server: ",
match $4 {
true =>
"yes",
false =>
"no (it is created on the first write)"
}
],
separator: ""
)
)
)
}
})