@damper/mcp 0.6.2 → 0.7.1
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.
- package/dist/index.js +56 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41,7 +41,7 @@ async function api(method, path, body) {
|
|
|
41
41
|
// Server
|
|
42
42
|
const server = new McpServer({
|
|
43
43
|
name: 'damper',
|
|
44
|
-
version: '0.
|
|
44
|
+
version: '0.6.0',
|
|
45
45
|
});
|
|
46
46
|
// Output schemas
|
|
47
47
|
const SubtaskProgressSchema = z.object({
|
|
@@ -1974,6 +1974,61 @@ server.registerTool('update_project_settings', {
|
|
|
1974
1974
|
structuredContent: result,
|
|
1975
1975
|
};
|
|
1976
1976
|
});
|
|
1977
|
+
// ==================== Public Pages ====================
|
|
1978
|
+
server.registerTool('open_public_page', {
|
|
1979
|
+
title: 'Open Public Page',
|
|
1980
|
+
description: 'Get the public URL for a project page (roadmap, feedback, changelog, or a specific roadmap item). ' +
|
|
1981
|
+
'Use this to share links with users or open pages in a browser.\n\n' +
|
|
1982
|
+
'**IMPORTANT:** NEVER guess or construct public page URLs yourself. Always call this tool to get the correct URL.\n\n' +
|
|
1983
|
+
'**Pages:** roadmap, feedback, changelog, roadmap_item\n' +
|
|
1984
|
+
'**roadmap_item** requires `itemId` parameter.',
|
|
1985
|
+
inputSchema: z.object({
|
|
1986
|
+
page: z.enum(['roadmap', 'feedback', 'changelog', 'roadmap_item'])
|
|
1987
|
+
.describe('Which public page to get the URL for'),
|
|
1988
|
+
itemId: z.string().optional()
|
|
1989
|
+
.describe('Roadmap item ID (required when page is "roadmap_item")'),
|
|
1990
|
+
}),
|
|
1991
|
+
outputSchema: z.object({
|
|
1992
|
+
url: z.string(),
|
|
1993
|
+
enabled: z.boolean(),
|
|
1994
|
+
note: z.string().optional(),
|
|
1995
|
+
}),
|
|
1996
|
+
annotations: {
|
|
1997
|
+
readOnlyHint: true,
|
|
1998
|
+
destructiveHint: false,
|
|
1999
|
+
idempotentHint: true,
|
|
2000
|
+
openWorldHint: false,
|
|
2001
|
+
},
|
|
2002
|
+
}, async ({ page, itemId }) => {
|
|
2003
|
+
if (page === 'roadmap_item' && !itemId) {
|
|
2004
|
+
return {
|
|
2005
|
+
content: [{ type: 'text', text: 'Error: itemId is required when page is "roadmap_item"' }],
|
|
2006
|
+
isError: true,
|
|
2007
|
+
};
|
|
2008
|
+
}
|
|
2009
|
+
const data = await api('GET', '/api/agent/project/public-urls');
|
|
2010
|
+
let url;
|
|
2011
|
+
let enabled;
|
|
2012
|
+
if (page === 'roadmap_item') {
|
|
2013
|
+
url = data.roadmapItemUrlTemplate.replace('{itemId}', itemId);
|
|
2014
|
+
enabled = data.pages.roadmap.enabled;
|
|
2015
|
+
}
|
|
2016
|
+
else {
|
|
2017
|
+
const pageData = data.pages[page];
|
|
2018
|
+
url = pageData.url;
|
|
2019
|
+
enabled = pageData.enabled;
|
|
2020
|
+
}
|
|
2021
|
+
const note = !enabled
|
|
2022
|
+
? `Note: This page is not currently enabled. The URL will work once the project owner enables it in settings.`
|
|
2023
|
+
: undefined;
|
|
2024
|
+
const parts = [url];
|
|
2025
|
+
if (note)
|
|
2026
|
+
parts.push(note);
|
|
2027
|
+
return {
|
|
2028
|
+
content: [{ type: 'text', text: parts.join('\n\n') }],
|
|
2029
|
+
structuredContent: { url, enabled, ...(note ? { note } : {}) },
|
|
2030
|
+
};
|
|
2031
|
+
});
|
|
1977
2032
|
// Start
|
|
1978
2033
|
async function main() {
|
|
1979
2034
|
const transport = new StdioServerTransport();
|