Skip to content

Commit b51f96f

Browse files
authored
Merge pull request #36 from khawkins/title_annotation_spec
Updating spec to require title annotation
2 parents 9ce39c9 + 62ee580 commit b51f96f

File tree

21 files changed

+39
-7
lines changed

21 files changed

+39
-7
lines changed

docs/2_salesforce-mobile-web-mcp-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ This ensures a frictionless, installation-free experience for developers and too
111111

112112
_See [Tool Annotations](https://modelcontextprotocol.io/docs/concepts/tools#tool-annotations) in the Model Context Protocol User Guide_
113113

114-
The following server tool annotations are applied based on tool type:
114+
All tools include a `title` annotation using the human-readable title specified in their respective tool suite documentation. The following additional server tool annotations are applied based on tool type:
115115

116116
**Information-Only Tools (e.g., Native Capabilities):**
117117

docs/3_mobile_native_capabilities.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ The Mobile Native Capabilities tool suite provides grounding context for creatin
2424

2525
# MCP Server Tools
2626

27+
Each tool's **Title** field is used as the `title` annotation in the MCP server implementation, providing human-readable display names for client interfaces.
28+
2729
## App Review
2830

2931
**Name:** `sfmobile-web-app-review`

docs/4_mobile_offline.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ The MCP server package includes:
327327

328328
# MCP Server Tools
329329

330+
Each tool's **Title** field is used as the `title` annotation in the MCP server implementation, providing human-readable display names for client interfaces.
331+
330332
## Tool 1: Mobile Offline Guidance
331333

332334
**Name:** `sfmobile-web-offline-guidance`

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/mobile-web/src/tools/mobile-offline/offline-analysis/tool.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const LINTER_CONFIG: Linter.Config = {
3434

3535
export class OfflineAnalysisTool implements Tool {
3636
readonly name = 'Mobile Web Offline Analysis Tool';
37+
readonly title = 'Salesforce Mobile Offline LWC Expert Static Analysis';
3738
readonly description =
3839
'Analyzes LWC components for mobile-specific issues and provides detailed recommendations for improvements. It can be leveraged to check if components are mobile-ready.';
3940
readonly toolId = 'sfmobile-web-offline-analysis';
@@ -55,7 +56,10 @@ export class OfflineAnalysisTool implements Tool {
5556
description: this.description,
5657
inputSchema: this.inputSchema.shape,
5758
outputSchema: this.outputSchema.shape,
58-
annotations: annotations,
59+
annotations: {
60+
...annotations,
61+
title: this.title,
62+
},
5963
},
6064
async (code: LwcCodeType) => {
6165
try {

packages/mobile-web/src/tools/mobile-offline/offline-guidance/tool.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const EMPTY_INPUT_SCHEMA = z.object({}).describe('No input required');
2121

2222
export class OfflineGuidanceTool implements Tool {
2323
readonly name = 'Mobile Web Offline Guidance Tool';
24+
readonly title = 'Salesforce Mobile Offline LWC Expert Instruction Delivery';
2425
readonly description =
2526
'Provides structured review instructions to detect and remediate Mobile Offline code violations in Lightning web components (LWCs) for Salesforce Mobile Apps.';
2627
readonly toolId = 'sfmobile-web-offline-guidance';
@@ -34,7 +35,10 @@ export class OfflineGuidanceTool implements Tool {
3435
description: this.description,
3536
inputSchema: this.inputSchema.shape,
3637
outputSchema: this.outputSchema.shape,
37-
annotations: annotations,
38+
annotations: {
39+
...annotations,
40+
title: this.title,
41+
},
3842
},
3943
async () => {
4044
try {

packages/mobile-web/src/tools/native-capabilities/appReview/tool.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { BaseTool } from '../baseTool.js';
99

1010
export class AppReviewTool extends BaseTool {
1111
readonly name = 'App Review Service';
12+
readonly title = 'Salesforce Mobile App Review LWC Native Capability';
1213
public readonly toolId = 'sfmobile-web-app-review';
1314
public readonly description =
1415
'Provides expert grounding to implement a mobile app store review feature in a Salesforce Lightning web component (LWC).';

packages/mobile-web/src/tools/native-capabilities/arSpaceCapture/tool.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { BaseTool } from '../baseTool.js';
99

1010
export class ArSpaceCaptureTool extends BaseTool {
1111
readonly name = 'AR Space Capture';
12+
readonly title = 'Salesforce Mobile AR Space Capture LWC Native Capability';
1213
public readonly toolId = 'sfmobile-web-ar-space-capture';
1314
public readonly description =
1415
'Provides expert grounding to implement an AR Space Capture feature in a Salesforce Lightning web component (LWC).';

packages/mobile-web/src/tools/native-capabilities/barcodeScanner/tool.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { BaseTool } from '../baseTool.js';
99

1010
export class BarcodeScannerTool extends BaseTool {
1111
readonly name = 'Barcode Scanner';
12+
readonly title = 'Salesforce Mobile Barcode Scanner LWC Native Capability';
1213
public readonly toolId = 'sfmobile-web-barcode-scanner';
1314
public readonly description =
1415
'Provides expert grounding to implement a Barcode Scanner feature in a Salesforce Lightning web component (LWC).';

packages/mobile-web/src/tools/native-capabilities/baseTool.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Tool } from '../tool.js';
1616
export abstract class BaseTool implements Tool {
1717
public abstract readonly name: string;
1818
public abstract readonly description: string;
19+
public abstract readonly title: string;
1920
protected abstract readonly typeDefinitionPath: string;
2021
public abstract readonly toolId: string;
2122
protected abstract readonly serviceDescription: string;
@@ -101,11 +102,17 @@ ${typeDefinitions}
101102
}
102103

103104
public register(server: McpServer, annotations: ToolAnnotations): void {
105+
// Add title annotation from the tool
106+
const enhancedAnnotations = {
107+
...annotations,
108+
title: this.title,
109+
};
110+
104111
server.tool(
105112
this.toolId,
106113
this.description,
107114
EmptySchema.shape,
108-
annotations,
115+
enhancedAnnotations,
109116
this.handleRequest.bind(this)
110117
);
111118
}

0 commit comments

Comments
 (0)