git-mob-mcp-server 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,11 +10,16 @@ export const registerGtMobResourceAsTool = (server, resource) => {
10
10
  openWorldHint: false,
11
11
  };
12
12
  const toolCallback = async (args, extra) => {
13
- const result = await readCallback(new URL(template.uriTemplate), args, extra);
14
- const text = result.contents
15
- .map((content) => (typeof content.text === "string" ? content.text : ""))
16
- .join("\n");
17
- return { content: [{ type: "text", text }] };
13
+ const resourceResult = await readCallback(new URL(template.uriTemplate), args, extra);
14
+ const toolResult = {
15
+ content: resourceResult.contents
16
+ .filter((content) => typeof content.text === "string")
17
+ .map((content) => ({
18
+ type: "text",
19
+ text: content.text,
20
+ })),
21
+ };
22
+ return toolResult;
18
23
  };
19
24
  server.registerTool(toolName, {
20
25
  description: String(metadata.description),
@@ -1,7 +1,12 @@
1
1
  import { ResourceTemplate, } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { getHelp } from "../clients/gitMobClient.js";
3
3
  const name = "git_mob_help";
4
- const template = new ResourceTemplate("gitmob://help", { list: undefined });
4
+ const template = new ResourceTemplate("gitmob://help{?command}", {
5
+ list: undefined,
6
+ complete: {
7
+ command: () => ["setup", "coauthor", "help"],
8
+ },
9
+ });
5
10
  const metadata = {
6
11
  description: "Displays general help and usage information for the Git Mob CLI. " +
7
12
  "You can optionally provide a command ('setup', 'coauthor', or 'help') " +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-mob-mcp-server",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "MCP Server for git-mob CLI app",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",