Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/scripts/mcp-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const GetPromoDraftsSchema = z.object({

const server = new Server(
{
name: "allthingsweb-scripts",
name: "allthings-scripts",
version: "1.0.0",
},
{
Expand Down
2 changes: 1 addition & 1 deletion app/src/app/mcp/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const handler = createMcpHandler(
}),
{
serverInfo: {
name: "all-things-web",
name: "allthings",
version: packageJson.version,
},
},
Expand Down
12 changes: 6 additions & 6 deletions app/src/lib/mcp/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async function withDataSource(
content: [
{
type: "text",
text: `All Things Web ${subject} are temporarily unavailable. Please retry in a minute.`,
text: `all things ${subject} are temporarily unavailable. Please retry in a minute.`,
},
],
};
Expand All @@ -73,7 +73,7 @@ export function registerAtwTools(
{
title: "List events",
description:
"List All Things Web events in San Francisco. Upcoming (including live) events come soonest first; past events come most recent first. Registration always happens at each event's rsvpUrl.",
"List all things events in San Francisco. Upcoming (including live) events come soonest first; past events come most recent first. Registration always happens at each event's rsvpUrl.",
inputSchema: z.object({
when: z
.enum(["upcoming", "past", "all"])
Expand Down Expand Up @@ -110,7 +110,7 @@ export function registerAtwTools(
{
title: "Get event",
description:
"Get one All Things Web event by slug: schedule, venue, talks with speakers, hosting companies and where to register.",
"Get one all things event by slug: schedule, venue, talks with speakers, hosting companies and where to register.",
inputSchema: z.object({
slug: z.string().min(1).describe("Event slug from list_events."),
}),
Expand Down Expand Up @@ -141,7 +141,7 @@ export function registerAtwTools(
{
title: "List speakers",
description:
"List people who have spoken at past All Things Web events, with their talks. Optionally filter by a case-insensitive name, title or talk search.",
"List people who have spoken at past all things events, with their talks. Optionally filter by a case-insensitive name, title or talk search.",
inputSchema: z.object({
query: z.string().trim().min(1).optional(),
limit: z.number().int().min(1).max(200).default(50),
Expand Down Expand Up @@ -177,9 +177,9 @@ export function registerAtwTools(
server.registerTool(
"get_community",
{
title: "About All Things Web",
title: "About all things",
description:
"What All Things Web is: mission, history, how hosting works, and links to events, Discord and the code of conduct.",
"What all things is: mission, history, how hosting works, and links to events, Discord and the code of conduct.",
inputSchema: z.object({}),
outputSchema: communitySchema,
annotations: readOnly,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe("MCP client", () => {
content: [
{
type: "text",
text: "All Things Web events are temporarily unavailable.",
text: "all things events are temporarily unavailable.",
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion web/src/mcp/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function mcpHandler(
const handler = createMcpHandler(
() => {
const server = new McpServer({
name: "all-things-web",
name: "allthings",
version: packageJson.version,
});
registerTools(server, run);
Expand Down
12 changes: 6 additions & 6 deletions web/src/mcp/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const withDataSource =
Effect.logError(`MCP tool ${tool} failed`, cause).pipe(
Effect.as(
fail(
`All Things Web ${subject} are temporarily unavailable. Please retry in a minute.`,
`all things ${subject} are temporarily unavailable. Please retry in a minute.`,
),
),
),
Expand Down Expand Up @@ -163,7 +163,7 @@ export function registerTools(server: McpServer, run: RunTool): void {
{
title: "List events",
description:
"List All Things Web events in San Francisco. Upcoming (including live) events come soonest first; past events come most recent first. Registration always happens at each event's rsvpUrl.",
"List all things events in San Francisco. Upcoming (including live) events come soonest first; past events come most recent first. Registration always happens at each event's rsvpUrl.",
inputSchema: z.object({
when: z
.enum(["upcoming", "past", "all"])
Expand All @@ -184,7 +184,7 @@ export function registerTools(server: McpServer, run: RunTool): void {
{
title: "Get event",
description:
"Get one All Things Web event by slug: schedule, venue, talks with speakers, hosting companies and where to register.",
"Get one all things event by slug: schedule, venue, talks with speakers, hosting companies and where to register.",
inputSchema: z.object({
slug: z.string().min(1).describe("Event slug from list_events."),
}),
Expand All @@ -199,7 +199,7 @@ export function registerTools(server: McpServer, run: RunTool): void {
{
title: "List speakers",
description:
"List people who have spoken at past All Things Web events, with their talks. Optionally filter by a case-insensitive name, title or talk search.",
"List people who have spoken at past all things events, with their talks. Optionally filter by a case-insensitive name, title or talk search.",
inputSchema: z.object({
query: z.string().trim().min(1).optional(),
limit: z.number().int().min(1).max(200).default(50),
Expand All @@ -215,9 +215,9 @@ export function registerTools(server: McpServer, run: RunTool): void {
server.registerTool(
"get_community",
{
title: "About All Things Web",
title: "About all things",
description:
"What All Things Web is: mission, history, how hosting works, and links to events, Discord and the code of conduct.",
"What all things is: mission, history, how hosting works, and links to events, Discord and the code of conduct.",
inputSchema: z.object({}),
outputSchema: outputSchema(Schema.Struct(Contract.Community.fields)),
annotations: readOnly,
Expand Down
2 changes: 1 addition & 1 deletion web/tests/support/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export async function loadApp(
throw error;
},
}),
{ serverInfo: { name: "all-things-web", version } },
{ serverInfo: { name: "allthings", version } },
);

const eventPath = /^\/api\/v1\/events\/([^/]+)$/;
Expand Down
11 changes: 10 additions & 1 deletion web/tests/worker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ describe("MCP", () => {
},
});
expect(actual).toEqual(expected);
// The server introduces itself by the new name.
expect(
(rpcMessage(actual.body) as { result: { serverInfo: { name: string } } })
.result.serverInfo.name,
).toBe("allthings");
});

it("lists the same tools, with the same input and output schemas", async ({
Expand All @@ -327,6 +332,10 @@ describe("MCP", () => {
// Names, titles, descriptions, annotations and input schemas, exactly.
const withoutOutput = ({ outputSchema: _, ...tool }: Tool) => tool;
expect(served.map(withoutOutput)).toEqual(today.map(withoutOutput));
// They name the community as all things, never by its old name.
expect(JSON.stringify(served.map(withoutOutput))).not.toMatch(
/all things web/i,
);
// Output schemas come from core's Effect contract: the same JSON Schema,
// as core's contract test defines sameness.
expect(
Expand Down Expand Up @@ -444,7 +453,7 @@ describe("MCP", () => {
content: [
{
type: "text",
text: `All Things Web ${subject} are temporarily unavailable. Please retry in a minute.`,
text: `all things ${subject} are temporarily unavailable. Please retry in a minute.`,
},
],
},
Expand Down
Loading