claude-code-emacs-mcp-server
Version:
MCP server for Claude Code Emacs integration
45 lines • 1.47 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleDescribeSymbol = handleDescribeSymbol;
async function handleDescribeSymbol(bridge, args) {
if (!bridge.isConnected()) {
return {
content: [{
type: 'text',
text: 'Error: Emacs is not connected'
}],
isError: true
};
}
try {
const result = await bridge.request('describeSymbol', args);
if (!result.description || !result.description.documentation) {
return {
content: [{
type: 'text',
text: `No documentation found for ${args.symbol}`
}]
};
}
// Return both content and structured data
const output = result.description.documentation;
return {
content: [{
type: 'text',
text: output.trim()
}],
// Include structured data for the output schema
documentation: result.description.documentation
};
}
catch (error) {
return {
content: [{
type: 'text',
text: `Error describing symbol: ${error instanceof Error ? error.message : 'Unknown error'}`
}],
isError: true
};
}
}
//# sourceMappingURL=describe-tools.js.map