Skip to main content
Glama
context.test.ts960 B
import { describe, it, expect } from "vitest"; import { summarizeFilesHandler, aggregateContextHandler } from "./context.js"; describe("Context Tools", () => { describe("summarizeFilesHandler", () => { it("should generate summary prompt", () => { const result = summarizeFilesHandler({ files: ["/path/to/a", "/path/to/b"], detailLevel: "brief", }); expect(result.content[0].text).toContain( "Please summarize the following 2 files", ); expect(result.content[0].text).toContain("- /path/to/a"); }); }); describe("aggregateContextHandler", () => { it("should generate aggregate context placeholder", () => { const result = aggregateContextHandler({ task: "Fix bug", }); expect(result.content[0].text).toContain( '# Aggregated Context for: "Fix bug"', ); expect(result.content[0].text).toContain("System would auto-gather"); }); }); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/millsydotdev/Code-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server