Skip to main content
Glama

lsp_format_document

Format source code documents using Language Server Protocol to apply consistent styling based on project-specific settings, supporting multiple programming languages.

Instructions

Format a document using the language server's formatting capabilities. Respects project-specific formatting settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file to format
tab_sizeNoNumber of spaces per tab (default: 2)
insert_spacesNoUse spaces instead of tabs (default: true)
applyNoIf true, apply formatting changes to file. If false, return edits without applying.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ProfessioneIT/lsp-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server