Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

feat(mcp): add annotations.title to every MCP tool

Amruth Pillaic9794c8646a9
diff --git a/docs/spec.json b/docs/spec.json
index 6c0453a76..812db6e72 100644
--- a/docs/spec.json
+++ b/docs/spec.json
@@ -1,7 +1,7 @@
{
"info": {
"title": "Reactive Resume",
- "version": "6.0.1",
+ "version": "6.0.2",
"description": "Reactive Resume API. Mutations do not support Idempotency-Key. Do not automatically retry POST, PUT, PATCH or DELETE requests after a timeout: first read the resource to determine whether the operation succeeded. Existing enum values and response shapes are retained for compatibility.",
"license": {
"name": "MIT",
@@ -36951,6 +36951,7 @@
"/career/schedules": {
"get": {
"operationId": "listCareerSchedules",
+ "summary": "List career schedules",
"tags": [
"Career"
],
@@ -37146,6 +37147,7 @@
},
"post": {
"operationId": "saveCareerSchedule",
+ "summary": "Save a career schedule",
"tags": [
"Career"
],
@@ -37458,6 +37460,7 @@
"/career/schedules/{id}": {
"delete": {
"operationId": "deleteCareerSchedule",
+ "summary": "Delete a career schedule",
"tags": [
"Career"
],
@@ -37531,6 +37534,7 @@
"/career/notifications": {
"get": {
"operationId": "listCareerNotifications",
+ "summary": "List career notifications",
"tags": [
"Career"
],
@@ -37806,6 +37810,7 @@
"/career/notifications/{id}/read": {
"post": {
"operationId": "readCareerNotification",
+ "summary": "Mark a career notification as read",
"tags": [
"Career"
],
@@ -37879,6 +37884,7 @@
"/career/opportunities": {
"get": {
"operationId": "listCareerOpportunities",
+ "summary": "List discovered opportunities",
"tags": [
"Career"
],
@@ -38050,6 +38056,7 @@
"/career/opportunities/{id}": {
"delete": {
"operationId": "dismissCareerOpportunity",
+ "summary": "Dismiss a discovered opportunity",
"tags": [
"Career"
],
@@ -38123,6 +38130,7 @@
"/career/opportunities/{id}/track": {
"post": {
"operationId": "trackCareerOpportunity",
+ "summary": "Track a discovered opportunity",
"description": "Creates an application at Saved with the posting link, summary and the preferences it matched.",
"tags": [
"Career"
@@ -38213,6 +38221,7 @@
"/career/profile": {
"get": {
"operationId": "getCareerProfile",
+ "summary": "Get career preferences",
"tags": [
"Career"
],
@@ -38381,6 +38390,7 @@
},
"put": {
"operationId": "saveCareerProfile",
+ "summary": "Save career preferences",
"tags": [
"Career"
],
@@ -38660,6 +38670,7 @@
"/career/facts": {
"get": {
"operationId": "listCareerFacts",
+ "summary": "List career facts",
"tags": [
"Career"
],
@@ -38899,6 +38910,7 @@
},
"post": {
"operationId": "saveCareerFact",
+ "summary": "Save a career fact",
"tags": [
"Career"
],
@@ -39151,6 +39163,7 @@
"/career/facts/{id}": {
"patch": {
"operationId": "updateCareerFact",
+ "summary": "Update a career fact",
"tags": [
"Career"
],
@@ -39249,6 +39262,7 @@
},
"delete": {
"operationId": "forgetCareerFact",
+ "summary": "Forget a career fact",
"tags": [
"Career"
],
@@ -39322,6 +39336,7 @@
"/career/stories": {
"get": {
"operationId": "listCareerStories",
+ "summary": "List career stories",
"tags": [
"Career"
],
@@ -39520,6 +39535,7 @@
},
"post": {
"operationId": "saveCareerStory",
+ "summary": "Save a career story",
"tags": [
"Career"
],
@@ -39779,6 +39795,7 @@
"/career/stories/{id}": {
"delete": {
"operationId": "deleteCareerStory",
+ "summary": "Delete a career story",
"tags": [
"Career"
],
@@ -39852,6 +39869,7 @@
"/career/saved": {
"get": {
"operationId": "listCareerSavedItems",
+ "summary": "List saved career work",
"tags": [
"Career"
],
@@ -40947,6 +40965,7 @@
"/career/saved/{id}": {
"delete": {
"operationId": "deleteCareerSavedItem",
+ "summary": "Delete saved career work",
"tags": [
"Career"
],
@@ -41020,6 +41039,7 @@
"/career/generate": {
"post": {
"operationId": "generateCareerWork",
+ "summary": "Generate AI work for an application",
"description": "Asks the default AI connection for one structured piece of work for an application (fit check, briefing, practice feedback, debrief review, employer message, answer draft). Everything but answer drafts is saved.",
"tags": [
"Career"
@@ -42291,6 +42311,7 @@
"/career/saved/{id}/apply": {
"post": {
"operationId": "applyCareerReply",
+ "summary": "Apply suggested changes from a message",
"tags": [
"Career"
],
@@ -42388,6 +42409,7 @@
"/career/workspace/{applicationId}": {
"get": {
"operationId": "getCareerWorkspace",
+ "summary": "Get an application workspace",
"tags": [
"Career"
],
@@ -42571,6 +42593,7 @@
},
"patch": {
"operationId": "saveCareerWorkspace",
+ "summary": "Save an application workspace",
"tags": [
"Career"
],
@@ -42966,6 +42989,7 @@
"/career/workspace/{applicationId}/submit": {
"post": {
"operationId": "submitCareerApplication",
+ "summary": "Mark an application as submitted",
"tags": [
"Career"
],
@@ -43125,6 +43149,7 @@
"/career/workspace/{applicationId}/answers": {
"post": {
"operationId": "snapshotCareerAnswers",
+ "summary": "Save the answers sent with an application",
"description": "Saves the workspace's answers as sent, after the application is marked as applied.",
"tags": [
"Career"
diff --git a/packages/api/src/features/career/router.ts b/packages/api/src/features/career/router.ts
index c5a820d07..771588c50 100644
--- a/packages/api/src/features/career/router.ts
+++ b/packages/api/src/features/career/router.ts
@@ -33,22 +33,46 @@ const savedItemOutput = savedItemSchema.extend({
export const careerRouter = {
voice: careerVoiceRouter,
schedules: protectedProcedure
- .route({ method: "GET", path: "/career/schedules", tags: ["Career"], operationId: "listCareerSchedules" })
+ .route({
+ method: "GET",
+ path: "/career/schedules",
+ tags: ["Career"],
+ operationId: "listCareerSchedules",
+ summary: "List career schedules",
+ })
.input(z.object({}))
.output(z.array(careerScheduleSchema))
.handler(({ context }) => careerJobs.list(context.user.id)),
saveSchedule: protectedProcedure
- .route({ method: "POST", path: "/career/schedules", tags: ["Career"], operationId: "saveCareerSchedule" })
+ .route({
+ method: "POST",
+ path: "/career/schedules",
+ tags: ["Career"],
+ operationId: "saveCareerSchedule",
+ summary: "Save a career schedule",
+ })
.input(careerScheduleInputSchema.extend({ id: z.string().optional() }))
.output(careerScheduleSchema)
.handler(({ context, input }) => careerJobs.save(context.user.id, input)),
deleteSchedule: protectedProcedure
- .route({ method: "DELETE", path: "/career/schedules/{id}", tags: ["Career"], operationId: "deleteCareerSchedule" })
+ .route({
+ method: "DELETE",
+ path: "/career/schedules/{id}",
+ tags: ["Career"],
+ operationId: "deleteCareerSchedule",
+ summary: "Delete a career schedule",
+ })
.input(id)
.output(z.void())
.handler(({ context, input }) => careerJobs.delete(context.user.id, input.id)),
notifications: protectedProcedure
- .route({ method: "GET", path: "/career/notifications", tags: ["Career"], operationId: "listCareerNotifications" })
+ .route({
+ method: "GET",
+ path: "/career/notifications",
+ tags: ["Career"],
+ operationId: "listCareerNotifications",
+ summary: "List career notifications",
+ })
.input(z.object({}))
.output(z.array(careerNotificationSchema))
.handler(({ context }) => careerJobs.notifications(context.user.id)),
@@ -58,12 +82,19 @@ export const careerRouter = {
path: "/career/notifications/{id}/read",
tags: ["Career"],
operationId: "readCareerNotification",
+ summary: "Mark a career notification as read",
})
.input(id)
.output(z.void())
.handler(({ context, input }) => careerJobs.markRead(context.user.id, input.id)),
opportunities: protectedProcedure
- .route({ method: "GET", path: "/career/opportunities", tags: ["Career"], operationId: "listCareerOpportunities" })
+ .route({
+ method: "GET",
+ path: "/career/opportunities",
+ tags: ["Career"],
+ operationId: "listCareerOpportunities",
+ summary: "List discovered opportunities",
+ })
.input(z.object({}))
.output(z.array(careerOpportunitySchema))
.handler(({ context }) => careerJobs.opportunities(context.user.id)),
@@ -73,6 +104,7 @@ export const careerRouter = {
path: "/career/opportunities/{id}",
tags: ["Career"],
operationId: "dismissCareerOpportunity",
+ summary: "Dismiss a discovered opportunity",
})
.input(id)
.output(z.void())
@@ -83,23 +115,42 @@ export const careerRouter = {
path: "/career/opportunities/{id}/track",
tags: ["Career"],
operationId: "trackCareerOpportunity",
+ summary: "Track a discovered opportunity",
description: "Creates an application at Saved with the posting link, summary and the preferences it matched.",
})
.input(id)
.output(applicationInput)
.handler(({ context, input }) => careerService.trackOpportunity(context.user.id, input.id)),
profile: protectedProcedure
- .route({ method: "GET", path: "/career/profile", tags: ["Career"], operationId: "getCareerProfile" })
+ .route({
+ method: "GET",
+ path: "/career/profile",
+ tags: ["Career"],
+ operationId: "getCareerProfile",
+ summary: "Get career preferences",
+ })
.input(z.object({}).optional())
.output(careerProfileDataSchema)
.handler(({ context }) => careerService.profile(context.user.id)),
saveProfile: protectedProcedure
- .route({ method: "PUT", path: "/career/profile", tags: ["Career"], operationId: "saveCareerProfile" })
+ .route({
+ method: "PUT",
+ path: "/career/profile",
+ tags: ["Career"],
+ operationId: "saveCareerProfile",
+ summary: "Save career preferences",
+ })
.input(careerProfileDataSchema)
.output(careerProfileDataSchema)
.handler(({ context, input }) => careerService.saveProfile(context.user.id, input)),
facts: protectedProcedure
- .route({ method: "GET", path: "/career/facts", tags: ["Career"], operationId: "listCareerFacts" })
+ .route({
+ method: "GET",
+ path: "/career/facts",
+ tags: ["Career"],
+ operationId: "listCareerFacts",
+ summary: "List career facts",
+ })
.input(
careerScopeSchema.extend({
query: z.string().max(500).optional(),
@@ -109,12 +160,24 @@ export const careerRouter = {
.output(z.array(careerFactSchema))
.handler(({ context, input }) => careerService.facts({ userId: context.user.id, ...input })),
saveFact: protectedProcedure
- .route({ method: "POST", path: "/career/facts", tags: ["Career"], operationId: "saveCareerFact" })
+ .route({
+ method: "POST",
+ path: "/career/facts",
+ tags: ["Career"],
+ operationId: "saveCareerFact",
+ summary: "Save a career fact",
+ })
.input(careerFactInputSchema)
.output(careerFactSchema.omit({ usedBy: true, company: true }).nullable())
.handler(({ context, input }) => careerService.saveFact(context.user.id, input)),
updateFact: protectedProcedure
- .route({ method: "PATCH", path: "/career/facts/{id}", tags: ["Career"], operationId: "updateCareerFact" })
+ .route({
+ method: "PATCH",
+ path: "/career/facts/{id}",
+ tags: ["Career"],
+ operationId: "updateCareerFact",
+ summary: "Update a career fact",
+ })
.input(
id.extend({
text: z.string().trim().min(1).max(2000).optional(),
@@ -127,27 +190,57 @@ export const careerRouter = {
await careerService.updateFact(context.user.id, input);
}),
forgetFact: protectedProcedure
- .route({ method: "DELETE", path: "/career/facts/{id}", tags: ["Career"], operationId: "forgetCareerFact" })
+ .route({
+ method: "DELETE",
+ path: "/career/facts/{id}",
+ tags: ["Career"],
+ operationId: "forgetCareerFact",
+ summary: "Forget a career fact",
+ })
.input(id)
.output(z.void())
.handler(({ context, input }) => careerService.forgetFact(context.user.id, input.id)),
stories: protectedProcedure
- .route({ method: "GET", path: "/career/stories", tags: ["Career"], operationId: "listCareerStories" })
+ .route({
+ method: "GET",
+ path: "/career/stories",
+ tags: ["Career"],
+ operationId: "listCareerStories",
+ summary: "List career stories",
+ })
.input(careerScopeSchema)
.output(z.array(careerStorySchema))
.handler(({ context, input }) => careerService.stories({ userId: context.user.id, ...input })),
saveStory: protectedProcedure
- .route({ method: "POST", path: "/career/stories", tags: ["Career"], operationId: "saveCareerStory" })
+ .route({
+ method: "POST",
+ path: "/career/stories",
+ tags: ["Career"],
+ operationId: "saveCareerStory",
+ summary: "Save a career story",
+ })
.input(careerStoryInputSchema.extend({ id: z.string().optional() }))
.output(careerStorySchema)
.handler(({ context, input: { id, ...input } }) => careerService.saveStory(context.user.id, input, id)),
deleteStory: protectedProcedure
- .route({ method: "DELETE", path: "/career/stories/{id}", tags: ["Career"], operationId: "deleteCareerStory" })
+ .route({
+ method: "DELETE",
+ path: "/career/stories/{id}",
+ tags: ["Career"],
+ operationId: "deleteCareerStory",
+ summary: "Delete a career story",
+ })
.input(id)
.output(z.void())
.handler(({ context, input }) => careerService.deleteStory(context.user.id, input.id)),
savedItems: protectedProcedure
- .route({ method: "GET", path: "/career/saved", tags: ["Career"], operationId: "listCareerSavedItems" })
+ .route({
+ method: "GET",
+ path: "/career/saved",
+ tags: ["Career"],
+ operationId: "listCareerSavedItems",
+ summary: "List saved career work",
+ })
.input(
z.object({
applicationId: z.string().min(1).optional(),
@@ -157,7 +250,13 @@ export const careerRouter = {
.output(z.array(savedItemOutput))
.handler(({ context, input }) => careerService.savedItems({ userId: context.user.id, ...input })),
deleteSavedItem: protectedProcedure
- .route({ method: "DELETE", path: "/career/saved/{id}", tags: ["Career"], operationId: "deleteCareerSavedItem" })
+ .route({
+ method: "DELETE",
+ path: "/career/saved/{id}",
+ tags: ["Career"],
+ operationId: "deleteCareerSavedItem",
+ summary: "Delete saved career work",
+ })
.input(id)
.output(z.void())
.handler(({ context, input }) => careerService.deleteSavedItem(context.user.id, input.id)),
@@ -168,6 +267,7 @@ export const careerRouter = {
path: "/career/generate",
tags: ["Career"],
operationId: "generateCareerWork",
+ summary: "Generate AI work for an application",
description:
"Asks the default AI connection for one structured piece of work for an application (fit check, briefing, practice feedback, debrief review, employer message, answer draft). Everything but answer drafts is saved.",
})
@@ -182,7 +282,13 @@ export const careerRouter = {
generateCareer({ userId: context.user.id, ...input, ...(signal ? { signal } : {}) }),
),
applyReply: protectedProcedure
- .route({ method: "POST", path: "/career/saved/{id}/apply", tags: ["Career"], operationId: "applyCareerReply" })
+ .route({
+ method: "POST",
+ path: "/career/saved/{id}/apply",
+ tags: ["Career"],
+ operationId: "applyCareerReply",
+ summary: "Apply suggested changes from a message",
+ })
.input(id.extend({ changes: z.array(z.number().int().min(0)).max(4) }))
.output(z.void())
.handler(({ context, input }) => careerService.applyReply(context.user.id, input.id, input.changes)),
@@ -192,6 +298,7 @@ export const careerRouter = {
path: "/career/workspace/{applicationId}",
tags: ["Career"],
operationId: "getCareerWorkspace",
+ summary: "Get an application workspace",
})
.input(applicationInput)
.output(careerWorkspaceSchema)
@@ -202,6 +309,7 @@ export const careerRouter = {
path: "/career/workspace/{applicationId}",
tags: ["Career"],
operationId: "saveCareerWorkspace",
+ summary: "Save an application workspace",
})
.input(
applicationInput
@@ -218,6 +326,7 @@ export const careerRouter = {
path: "/career/workspace/{applicationId}/submit",
tags: ["Career"],
operationId: "submitCareerApplication",
+ summary: "Mark an application as submitted",
})
.input(
applicationInput.extend({
@@ -235,6 +344,7 @@ export const careerRouter = {
path: "/career/workspace/{applicationId}/answers",
tags: ["Career"],
operationId: "snapshotCareerAnswers",
+ summary: "Save the answers sent with an application",
description: "Saves the workspace's answers as sent, after the application is marked as applied.",
})
.input(applicationInput)
diff --git a/packages/mcp/src/mcp-server-card.test.ts b/packages/mcp/src/mcp-server-card.test.ts
index 1d1a76d2f..5063453f1 100644
--- a/packages/mcp/src/mcp-server-card.test.ts
+++ b/packages/mcp/src/mcp-server-card.test.ts
@@ -9,6 +9,8 @@ describe("buildMcpServerCard", () => {
expect(tool.inputSchema, tool.name).toBeDefined();
expect(tool.annotations, tool.name).toBeDefined();
expect(tool.title.length, tool.name).toBeGreaterThan(0);
+ // Connector directories reject tools without annotations.title.
+ expect(tool.annotations.title, tool.name).toBe(tool.title);
expect(tool.description.length, tool.name).toBeGreaterThan(0);
}
});
diff --git a/packages/mcp/src/parity.ts b/packages/mcp/src/parity.ts
index 4c8dcca95..c41d4e608 100644
--- a/packages/mcp/src/parity.ts
+++ b/packages/mcp/src/parity.ts
@@ -1,4 +1,5 @@
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
+import type { ToolAnnotations } from "@modelcontextprotocol/sdk/types.js";
import type { AnyProcedure, InferRouterInitialContext, RouterClient } from "@orpc/server";
import type { RequestAuthentication } from "@reactive-resume/api/context";
import { call, ORPCError } from "@orpc/server";
@@ -146,6 +147,17 @@ const BROWSER_HANDOFFS = {
"auth.deleteAccount": "account",
} as const;
+const HANDOFF_TITLES: Record<string, string> = {
+ "aiProviders.create": "Add an AI provider in the app",
+ "aiProviders.update": "Edit an AI provider in the app",
+ "webAccess.save": "Set up web search in the app",
+ "resume.getRoot": "Open the dashboard",
+ "auth.createApiKey": "Create an API key in the app",
+ "auth.deleteAccount": "Delete your account in the app",
+ "resume.setPassword": "Set a resume's share password in the app",
+ "resume.verifyPassword": "Open a password-protected resume",
+};
+
/** Resume share passwords are credentials too: owners set them and visitors enter them in the browser. */
const RESUME_PASSWORD_HANDOFFS = {
"resume.setPassword": {
@@ -173,29 +185,31 @@ type HandoffToolMeta = {
description: string;
inputSchema: z.ZodObject;
outputSchema: typeof handoffOutputSchema;
- annotations: typeof handoffAnnotations;
+ annotations: ToolAnnotations;
+};
+// Directories show annotations.title as the tool's name, so every tool repeats its title there.
+const handoffMeta = (path: string, description: string, inputSchema: z.ZodObject): HandoffToolMeta => {
+ const title = HANDOFF_TITLES[path] ?? `Open ${path} in the app`;
+ return {
+ title,
+ description,
+ inputSchema,
+ outputSchema: handoffOutputSchema,
+ annotations: { title, ...handoffAnnotations },
+ };
};
const browserToolMeta: Record<string, HandoffToolMeta> = Object.fromEntries([
...Object.keys(BROWSER_HANDOFFS).map((path) => [
parityToolName(path),
- {
- title: `Open ${path} in the app`,
- description:
- "Complete this workflow in the authenticated browser. Provider keys, passwords, passkeys and other account credentials stay out of tool arguments. No change is made by this tool.",
- inputSchema: z.object({}),
- outputSchema: handoffOutputSchema,
- annotations: handoffAnnotations,
- },
+ handoffMeta(
+ path,
+ "Complete this workflow in the authenticated browser. Provider keys, passwords, passkeys and other account credentials stay out of tool arguments. No change is made by this tool.",
+ z.object({}),
+ ),
]),
...Object.entries(RESUME_PASSWORD_HANDOFFS).map(([path, { description, inputSchema }]) => [
parityToolName(path),
- {
- title: `Open ${path} in the app`,
- description,
- inputSchema,
- outputSchema: handoffOutputSchema,
- annotations: handoffAnnotations,
- },
+ handoffMeta(path, description, inputSchema),
]),
]);
const accountToolMeta = {
@@ -206,7 +220,7 @@ const accountToolMeta = {
page: z.enum(["profile", "authentication", "api-keys", "preferences", "account"]).default("profile"),
}),
outputSchema: z.object({ url: z.url(), requiresBrowser: z.literal(true) }),
- annotations: handoffAnnotations,
+ annotations: { title: "Open account settings", ...handoffAnnotations },
};
type ParityToolContract = {
@@ -279,7 +293,7 @@ export const PARITY_TOOL_META: Record<
Pick<ReturnType<typeof parityToolContract>, "inputSchema" | "outputSchema"> & {
title: string;
description: string;
- annotations: typeof handoffAnnotations;
+ annotations: ToolAnnotations;
}
> = {
...Object.fromEntries(
@@ -288,14 +302,16 @@ export const PARITY_TOOL_META: Record<
const readOnly =
(route.method === "GET" || readOnlyPosts.has(path)) && !["resume.getBySlug", "aiProviders.list"].includes(path);
const contract = parityToolContract(path, procedure);
+ const title = route.summary ?? path;
return [
parityToolName(path),
{
- title: route.summary ?? path,
+ title,
description: `${PARITY_TOOL_DESCRIPTIONS[path] ?? route.description ?? route.summary ?? path}${path === "resume.updates.subscribe" ? " Returns an owned snapshot; poll updatedAt for changes over stateless MCP." : ""}${streamingPaths.has(path) ? " Returns collected stream chunks, at most 500,000 characters; use the thread getter to retrieve persisted assistant replies." : ""}${exportPaths.has(path) ? " Returns an authenticated REST download URL; send the same bearer token or API key to download. Rendering occurs when downloaded." : ""}`,
inputSchema: contract.inputSchema,
outputSchema: contract.outputSchema,
annotations: {
+ title,
readOnlyHint: readOnly,
destructiveHint:
!readOnly &&
diff --git a/packages/mcp/src/tool-meta.ts b/packages/mcp/src/tool-meta.ts
index 3fd7a7f25..55ab30794 100644
--- a/packages/mcp/src/tool-meta.ts
+++ b/packages/mcp/src/tool-meta.ts
@@ -910,7 +910,17 @@ const applicationDateFields = {
.describe("Follow-up timestamp with timezone offset."),
};
// Shared DTOs keep fields, validation and limits aligned with API contracts.
-export const TOOL_META = {
+// Directories show annotations.title as the tool's name, so every tool repeats its title there.
+function withAnnotationTitles<T extends Record<string, { title: string; annotations: ToolAnnotations }>>(meta: T): T {
+ return Object.fromEntries(
+ Object.entries(meta).map(([name, tool]) => [
+ name,
+ { ...tool, annotations: { title: tool.title, ...tool.annotations } },
+ ]),
+ ) as T;
+}
+
+export const TOOL_META = withAnnotationTitles({
...BASE_TOOL_META,
[T.listResumes]: {
...BASE_TOOL_META[T.listResumes],
@@ -1024,4 +1034,4 @@ export const TOOL_META = {
inputSchema: wireInput(applicationDto.bulkDelete.input.strict()),
outputSchema: toWireObjectSchema(applicationDto.bulkDelete.output),
},
-} as const;
+} as const);