fix mcp tool names

This commit is contained in:
hzrd149
2025-03-27 19:08:14 +00:00
parent 0235ae5fcc
commit bbfa05a699
4 changed files with 7 additions and 7 deletions

View File

@@ -5,7 +5,7 @@ import { FollowUser, UnfollowUser } from "applesauce-actions/actions";
import { normalizeToHexPubkey } from "../../../helpers/nip19.js";
server.tool(
"Follow user",
"follow_user",
"Adds another users pubkey to the owners following list",
{ pubkey: z.string().transform((hex) => normalizeToHexPubkey(hex, true)) },
async ({ pubkey }) => {
@@ -19,7 +19,7 @@ server.tool(
);
server.tool(
"Unfollow user",
"unfollow_user",
"Removes another users pubkey from the owners following list",
{ pubkey: z.string().transform((hex) => normalizeToHexPubkey(hex, true)) },
async ({ pubkey }) => {

View File

@@ -6,7 +6,7 @@ import { NostrConnectSigner } from "applesauce-signers";
import { NostrConnectAccount } from "applesauce-accounts/accounts";
server.tool(
"Set owner nostr connect URI",
"set_owner_nostr_connect_uri",
"Sets the nostr connect URI that should be used to request signatures from the owners pubkey",
{ uri: z.string().startsWith("bunker://") },
async ({ uri }) => {

View File

@@ -1,12 +1,12 @@
import database from "../../database.js";
import server from "../server.js";
server.tool("Total events", "Get the total number of events in the database", {}, async () => {
server.tool("total_events", "Get the total number of events in the database", {}, async () => {
const result = database.db.prepare<[], { events: number }>(`SELECT COUNT(*) AS events FROM events`).get();
return { content: [{ type: "text", text: `Total events: ${result?.events ?? 0}` }] };
});
server.tool("Total users", "Get the total number of users in the database", {}, async () => {
server.tool("total_users", "Get the total number of users in the database", {}, async () => {
const result = database.db
.prepare<[], { users: number }>(`SELECT COUNT(*) AS users FROM events GROUP BY pubkey`)
.get();

View File

@@ -11,7 +11,7 @@ import config from "../../config.js";
import { lastValueFrom, toArray } from "rxjs";
server.tool(
"Sign draft event",
"sign_draft_event",
"Signs a draft note event with the owners pubkey",
{
draft: z.object({
@@ -35,7 +35,7 @@ server.tool(
);
server.tool(
"Publish event",
"publish_event",
"Publishes an event to the owners outbox relays",
{
event: z.object({