@damper/mcp 0.3.13 → 0.3.14
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 +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -841,7 +841,12 @@ server.registerTool('update_context_section', {
|
|
|
841
841
|
openWorldHint: false,
|
|
842
842
|
},
|
|
843
843
|
}, async ({ section, content, tags, appliesTo }) => {
|
|
844
|
-
|
|
844
|
+
// Encode each path segment individually but preserve slashes for hierarchical sections
|
|
845
|
+
const encodedSection = section
|
|
846
|
+
.split('/')
|
|
847
|
+
.map(part => encodeURIComponent(part))
|
|
848
|
+
.join('/');
|
|
849
|
+
const result = await api('POST', `/api/agent/context/${encodedSection}`, { content, tags, appliesTo });
|
|
845
850
|
let text = `📝 Updated context section: ${result.section}`;
|
|
846
851
|
if (result.tags && result.tags.length > 0) {
|
|
847
852
|
text += ` [${result.tags.join(', ')}]`;
|