[WIP] Refactor everything server to be more modular and use recommended APIs.
Adding the annotated message tool * Updated architecture.md * In annotated-message.ts - prettier
This commit is contained in:
parent
0bf6c6911d
commit
328a990163
1 changed files with 7 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
||||
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
||||
import { z } from "zod";
|
||||
import {MCP_TINY_IMAGE} from "./get-tiny-image.js";
|
||||
import { MCP_TINY_IMAGE } from "./get-tiny-image.js";
|
||||
|
||||
// Tool input schema
|
||||
const AnnotatedMessageSchema = z.object({
|
||||
|
|
@ -18,11 +18,11 @@ const AnnotatedMessageSchema = z.object({
|
|||
const name = "annotated-message";
|
||||
const config = {
|
||||
title: "Annotated Message Tool",
|
||||
description: "Demonstrates how annotations can be used to provide metadata about content.",
|
||||
description:
|
||||
"Demonstrates how annotations can be used to provide metadata about content.",
|
||||
inputSchema: AnnotatedMessageSchema,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Registers the 'annotated-message' tool with the provided McpServer instance.
|
||||
*
|
||||
|
|
@ -39,7 +39,7 @@ export const registerAnnotatedMessageTool = (server: McpServer) => {
|
|||
server.registerTool(name, config, async (args): Promise<CallToolResult> => {
|
||||
const { messageType, includeImage } = AnnotatedMessageSchema.parse(args);
|
||||
|
||||
const content: CallToolResult["content"] = [];
|
||||
const content: CallToolResult["content"] = [];
|
||||
|
||||
// Main message with different priorities/audiences based on type
|
||||
if (messageType === "error") {
|
||||
|
|
|
|||
Loading…
Reference in a new issue