diff --git a/README.md b/README.md index 584df42..0b56586 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,15 @@ This MCP service integrates with EdgeOne Pages Functions to deploy static HTML c For more information, see the [EdgeOne Pages Functions documentation](https://edgeone.ai/document/162227908259442688) and [EdgeOne Pages KV Storage Guide](https://edgeone.ai/document/162227803822321664). + + +## Running evals + +The evals package loads an mcp client that then runs the index.ts file, so there is no need to rebuild between tests. You can load environment variables by prefixing the npx command. Full documentation can be found [here](https://www.mcpevals.io/docs). + +```bash +OPENAI_API_KEY=your-key npx mcp-eval evals.ts index.ts +``` ## License MIT diff --git a/evals.ts b/evals.ts new file mode 100644 index 0000000..882caf7 --- /dev/null +++ b/evals.ts @@ -0,0 +1,32 @@ +//evals.ts + +import { EvalConfig } from 'mcp-evals'; +import { openai } from "@ai-sdk/openai"; +import { grade, EvalFunction } from "mcp-evals"; + +const deploy_htmlEval: EvalFunction = { + name: 'deploy_html Tool Evaluation', + description: 'Tests the deployment of HTML content to EdgeOne Pages, returning the public URL', + run: async () => { + const result = await grade(openai("gpt-4"), "Deploy the following HTML to EdgeOne: