mirror of
https://github.com/penpot/penpot.git
synced 2026-08-11 15:29:06 +00:00
* ✨ Reduce instructions transferred at MCP connection to a minimum Force on-demand loading of the 'Penpot High-Level Overview', which was previously transferred in the MCP server's instructions. This greatly reduces the number of tokens for users who will not actually interact with Penpot, allowing the MCP server to remain enabled for such users without wasting too many tokens. Resolves #8647 * 📎 Update Serena project
27 lines
937 B
TypeScript
27 lines
937 B
TypeScript
import { EmptyToolArgs, Tool } from "../Tool";
|
|
import "reflect-metadata";
|
|
import type { ToolResponse } from "../ToolResponse";
|
|
import { TextResponse } from "../ToolResponse";
|
|
import { PenpotMcpServer } from "../PenpotMcpServer";
|
|
|
|
export class HighLevelOverviewTool extends Tool<EmptyToolArgs> {
|
|
constructor(mcpServer: PenpotMcpServer) {
|
|
super(mcpServer, EmptyToolArgs.schema);
|
|
}
|
|
|
|
public getToolName(): string {
|
|
return "high_level_overview";
|
|
}
|
|
|
|
public getToolDescription(): string {
|
|
return (
|
|
"Returns basic high-level instructions on the usage of Penpot-related tools and the Penpot API. " +
|
|
"If you have already read the 'Penpot High-Level Overview', you must not call this tool."
|
|
);
|
|
}
|
|
|
|
protected async executeCore(args: EmptyToolArgs): Promise<ToolResponse> {
|
|
return new TextResponse(this.mcpServer.getHighLevelOverviewInstructions());
|
|
}
|
|
}
|