Skip to main content
Glama
robertcprice

GLM-4.7 MCP Server

by robertcprice

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ZAI_API_KEYYesYour Z.ai API key for accessing GLM-4.7 model

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
glm_askA

Quick question to GLM - no tools, fast response.

Use for: explanations, analysis, brainstorming, quick answers. Does NOT have access to files or tools - pure generation.

Cost: ~10x cheaper than Claude Haiku. Use liberally.

Args: question: Your question or prompt model: "haiku" (fastest) or "sonnet" (better quality)

Returns: GLM's response

glm_summarizeA

Summarize text using GLM.

Use for: document summaries, meeting notes, code explanations.

Args: text: The text to summarize style: "concise", "detailed", "bullet-points", "executive" model: "haiku" or "sonnet"

Returns: Summarized text

glm_explainA

Explain code or a concept using GLM.

Use for: understanding code, learning concepts, documentation.

Args: code_or_concept: Code snippet or concept to explain context: Additional context (e.g., language, framework) model: "haiku" or "sonnet"

Returns: Explanation

glm_analyzeA

Analyze codebase using GLM with read access.

Use for: understanding code structure, finding patterns, architecture analysis, dependency mapping.

Has READ-ONLY access: Read, Glob, Grep, LS, Bash (safe commands).

Args: task: Analysis task to perform working_directory: Project directory (defaults to current) model: "haiku" or "sonnet"

Returns: Analysis results

glm_reviewA

Code review by GLM agent.

Use for: security review, performance analysis, best practices.

Args: code_or_file: Inline code or file path to review review_focus: "general", "security", "performance", "style", "bugs" working_directory: Directory context for file paths model: "haiku" or "sonnet"

Returns: Code review with findings and suggestions

glm_find_bugsA

Find potential bugs in code using GLM.

Use for: bug detection, edge case analysis, error prone patterns.

Args: code_or_file: Inline code or file path to analyze working_directory: Directory context for file paths model: "haiku" or "sonnet"

Returns: List of potential bugs with explanations

glm_implementA

GLM agent with write access for implementation tasks.

Use for: writing code, creating files, making changes, refactoring.

Has FULL access including Write and Edit. WARNING: This can modify files.

Args: task: Implementation task to perform working_directory: Project directory (REQUIRED) allowed_tools: Tools to allow (default: full coding set) model: "haiku" or "sonnet"

Returns: Agent's output including changes made

glm_refactorA

Refactor code using GLM.

Use for: improving code structure, applying patterns, cleanup.

Args: file_path: Path to file to refactor instructions: Refactoring instructions working_directory: Project directory model: "haiku" or "sonnet"

Returns: Refactored code and explanation

glm_write_testsA

Generate unit tests for a file using GLM.

Use for: test generation, coverage improvement, TDD support.

Args: file_path: Path to file to test test_framework: "pytest", "jest", "vitest", "unittest" working_directory: Project directory model: "haiku" or "sonnet"

Returns: Generated test file

glm_documentA

Add or update documentation for a file using GLM.

Use for: adding docstrings, generating README, documenting APIs.

Args: file_path: Path to file to document style: "google", "sphinx", "numpy", "javadoc" working_directory: Project directory model: "haiku" or "sonnet"

Returns: File with added documentation

glm_generate_readmeA

Generate a README.md for a project using GLM.

Use for: creating project documentation, onboarding.

Args: working_directory: Project directory style: "standard", "comprehensive", "minimal" model: "haiku" or "sonnet"

Returns: Generated README.md content

glm_statusA

Check GLM MCP server status and configuration.

Returns: Status information about the GLM server setup

glm_compare_costsA

Compare costs between Claude and GLM.

Args: tokens_input: Input tokens to compare tokens_output: Output tokens to compare

Returns: Cost comparison table

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/robertcprice/glm-mcp-server'

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