Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Tools

Functions exposed to the LLM to take actions

NameDescription
parse_stack

Parse Error Stack Trace

This tool allows you to parse error stack traces by providing the following:

  • A downloadable source map URL.

  • The line and column numbers from the stack trace.

The tool will map the provided stack trace information to the corresponding source code location using the source map. It also supports fetching additional context lines around the error location for better debugging.

Parameters:

  • stacks: An array of stack trace objects, each containing:

    • line: The line number in the stack trace.

    • column: The column number in the stack trace.

    • sourceMapUrl: The URL of the source map file corresponding to the stack trace.

  • ctxOffset (optional): The number of additional context lines to include before and after the error location in the source code. Defaults to 5.

Returns:

  • A JSON object containing the parsed stack trace information, including the mapped source code location and context lines.

  • If parsing fails, an error message will be returned for the corresponding stack trace.

lookup_context

Lookup Source Code Context

This tool looks up original source code context for a specific line and column position in compiled/minified code.

Parameters:

  • line: The line number in the compiled code (1-based)

  • column: The column number in the compiled code

  • sourceMapUrl: The URL of the source map file

  • contextLines (optional): Number of context lines to include before and after the target line (default: 5)

Returns:

  • A JSON object containing the source code context snippet with file path, target line info, and surrounding context lines

  • Returns null if the position cannot be mapped

unpack_sources

Unpack Source Map Sources

This tool extracts all source files and their content from a source map.

Parameters:

  • sourceMapUrl: The URL of the source map file to unpack

Returns:

  • A JSON object containing:

    • sources: Object with source file paths as keys and their content as values

    • sourceRoot: The source root path from the source map

    • file: The original file name

    • totalSources: Total number of source files found

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/MasonChow/source-map-parser-mcp'

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