Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OLLAMA_MODELNoOllama model name
GOOGLE_API_KEYNoGoogle API key for Gemini image generation
OPENAI_API_KEYNoOpenAI API key for gpt-image-2
OLLAMA_BASE_URLNoBase URL for Ollama server
AFM_MANIFEST_DIRNoDirectory to store generation manifests (optional)
AFM_IMAGE_PROVIDERNoThe image provider to use: google, openrouter, openai, ollama
OPENROUTER_API_KEYNoOpenRouter API key

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
plan_figureA

Plan the best figure type, route, and guardrails before generation.

This tool returns a structured plan so an MCP host can decide whether to use direct image generation, SVG-style rendering, or deterministic chart routes.

Provide either pmid or a generic source brief. Generic planning supports preprints, repositories, and freeform briefs by passing source_title plus optional source_summary and source_identifier.

output_format: Optional final raster delivery type such as png, gif, jpeg, or webp. The planner stores this preference inside planned_payload for downstream rendering.

expected_labels: Optional list of exact text labels (especially CJK) the figure must contain. Enables CJK text fidelity guardrails and model escalation.

generate_figureA

Generate a publication-ready visual asset.

Single high-level entrypoint: callers may provide planned_payload directly, or pass a PMID / generic source brief and let the use case plan internally before rendering.

output_format: Optional final raster delivery type such as png, gif, jpeg, or webp. MCP applies the conversion internally after generation when possible.

figure_type: auto | flowchart | mechanism | comparison | infographic | anatomical | timeline | data_visualization

edit_figureA

Refine an academic figure using natural language feedback.

output_format: Optional final raster delivery type such as png, gif, jpeg, or webp.

Examples: "箭頭改紅色", "標題字大一點", "Add PMID in footer"

prepare_publication_imageA

Resize a raster image and write publication DPI metadata using code only.

This tool never calls image-generation providers. To truly meet 600 DPI for final publication size, pass width_mm and/or height_mm. Without a final print size it preserves pixel dimensions and writes target_dpi metadata only.

output_format: Optional raster delivery type: png, jpeg, or tiff.

evaluate_figureC

Evaluate an academic figure using the 8-domain quality checklist.

Domains: text accuracy, anatomy, color, layout, scientific accuracy, legibility, visual polish, citation.

batch_generateA

Generate academic figures for multiple PMIDs in sequence.

Batch mode validates the full PMID list up front and propagates language, output size, and output directory into every generation request.

composite_figureC

Composite multiple panel images into a publication-ready figure.

replay_manifestC

Replay a previously saved manifest using the same prompt.

record_host_reviewB

Record a host-side visual review back into a persisted manifest.

Use this when Copilot or another host model inspects the generated image directly and needs to write its verdict back into the review harness.

retarget_journalA

Apply a new journal profile to an existing manifest and regenerate the figure.

list_manifestsA

List recent manifests for replay or retargeting.

get_manifest_detailA

Load one manifest with full review history and lineage context.

verify_figureA

Run the automated quality gate on a generated figure.

Uses vision self-check to evaluate 8 quality domains and verify CJK text rendering accuracy. Returns pass/fail verdict, domain scores, and any missing or garbled labels.

expected_labels: Exact text strings (e.g. CJK labels) the figure should contain.

multi_turn_editA

Iteratively refine a figure through a multi-turn editing session.

Sends multiple editing instructions turn-by-turn to fix CJK labels, adjust layout, or improve details. Each turn builds on the previous result for precise iterative corrections.

instructions: List of natural language editing instructions applied in order. Examples: ["修正標題為「急性冠心症處置流程」", "箭頭改紅色", "加大字體"]

Prompts

Interactive templates invoked by user choice

NameDescription
plan_figure_requestReusable planning prompt for a PMID-driven academic figure request.
transform_figure_requestReusable prompt template for style conversion on an existing figure.

Resources

Contextual data attached and managed by the client

NameDescription
inventory_resourceServer inventory for MCP hosts and agent discovery.
provider_capabilities_resourceProvider capability matrix for MCP hosts and extension discovery.
gemini_image_baseline_resourceOfficial Gemini image-generation defaults used by this repo.
renderer_ecosystem_resourceTracked open-source renderer and editor ecosystem.

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/u9401066/academic-figures-mcp'

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