Snail.Sdk.Mcp.Testing

The public API, generated by Snail.Sdk.Docs from the built assembly and its XML documentation. Do not edit: build with -p:SnailReference=true.

Snail.Sdk.Mcp.Testing

static class ServerProgram

A server under test, started as a program the way a client starts it.

Member Summary
Task<McpClient> StartAsync(string assemblyName, string overrideVariable, IDictionary<string, string?>? environment = null, CancellationToken cancellationToken = default) The server started and connected, with these variables in its environment, Home as its home and NoSettingsFile as its settings file.
ValueTuple<string, string[]> Command(string assemblyName, string overrideVariable) What starts the server: the program the variable names — through dotnet when it is a framework-dependent dll — or dotnet <assembly>.dll beside the tests.
string Home { get; } The home folder a server under test gets unless the test names one: empty and its own, so the server reads none of the developer's settings and writes nothing into their data.
string NoSettingsFile { get; } A settings file that never exists, for SNAIL_MCP_<SHORT>_CONFIG of a server under test: a file the variable names is the only one the server reads, so it reads none — not even one in the working directory.
string Text(CallToolResult answer) The text of a tool's answer; the same as answer.Text() of ToolAnswers.

static class TestFolder

Temporary folders of a test, named so that a cleaner can prove a folder is a leftover once its test process has ended.

Member Summary
string Create() A new empty folder for a test, directly in the temporary folder and named by the convention a cleaner reads.

static class ToolAnswers

What a test reads from a tool's answer.

Member Summary
string Text(this CallToolResult answer) The text of a tool's answer, which is one text block in every Snail server.

static class ToolGuards

The guard rules every Snail server's tools keep, checked on the list a client receives.

Member Summary
IReadOnlyList<string> Problems(IEnumerable<Tool> tools) Every rule a tool breaks, one line each; empty when all hold.