mcp-fmt 0.3.1 → 0.3.2
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 +4 -3
- package/dist/response.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -121,12 +121,13 @@ function assignmentBadge(assignment) {
|
|
|
121
121
|
return ASSIGNMENT_EMOJI[assignment] ?? "\uD83D\uDC64";
|
|
122
122
|
}
|
|
123
123
|
// src/response.ts
|
|
124
|
-
var RENDER_HINT =
|
|
125
|
-
var SERVER_INSTRUCTIONS =
|
|
124
|
+
var RENDER_HINT = 'MANDATORY: This tool result is pre-formatted markdown. You MUST paste the full content below verbatim into your response as rendered markdown. Do NOT summarize, paraphrase, reference it, or say "see above" — paste it directly, every time.';
|
|
125
|
+
var SERVER_INSTRUCTIONS = 'CRITICAL: When a tool result contains [render-hint], you MUST copy the entire content verbatim into your response as rendered markdown — every single time, without exception. Never summarize, collapse, paraphrase, or reference the output. Never say "see above" or "rendered above". Always paste it directly.';
|
|
126
126
|
function response(text) {
|
|
127
127
|
return {
|
|
128
128
|
content: [{ type: "text", text: `[render-hint]: # "${RENDER_HINT}"
|
|
129
|
-
${text}
|
|
129
|
+
${text}
|
|
130
|
+
[/render-hint]: # "Paste the markdown above verbatim in your response now."` }]
|
|
130
131
|
};
|
|
131
132
|
}
|
|
132
133
|
export {
|
package/dist/response.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface McpResponse {
|
|
|
12
12
|
* @example
|
|
13
13
|
* { name: 'my_tool', description: `List tasks. ${RENDER_HINT}`, ... }
|
|
14
14
|
*/
|
|
15
|
-
export declare const RENDER_HINT = "
|
|
15
|
+
export declare const RENDER_HINT = "MANDATORY: This tool result is pre-formatted markdown. You MUST paste the full content below verbatim into your response as rendered markdown. Do NOT summarize, paraphrase, reference it, or say \"see above\" \u2014 paste it directly, every time.";
|
|
16
16
|
/**
|
|
17
17
|
* Add to your McpServer instructions so Claude always outputs tool results
|
|
18
18
|
* verbatim as rendered markdown, instead of collapsing or summarizing them.
|
|
@@ -22,5 +22,5 @@ export declare const RENDER_HINT = "Output is pre-formatted markdown. Render it
|
|
|
22
22
|
* instructions: `Your server description. ${SERVER_INSTRUCTIONS}`
|
|
23
23
|
* })
|
|
24
24
|
*/
|
|
25
|
-
export declare const SERVER_INSTRUCTIONS = "
|
|
25
|
+
export declare const SERVER_INSTRUCTIONS = "CRITICAL: When a tool result contains [render-hint], you MUST copy the entire content verbatim into your response as rendered markdown \u2014 every single time, without exception. Never summarize, collapse, paraphrase, or reference the output. Never say \"see above\" or \"rendered above\". Always paste it directly.";
|
|
26
26
|
export declare function response(text: string): McpResponse;
|