Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PININ_API_KEYYes
PININ_MCP_URLNohttps://pinin.ai/api/mcp
PININ_MCP_DEBUGNo0

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Pinin restores historical photographs: colorization, damage repair, detail enhancement, fade recovery and upscaling. Every image costs one credit, charged when the job settles and refunded automatically if it fails. Restored files are retained for 30 days. Workflow: call pinin_restore_photo, then poll pinin_get_restoration (honour its retry_after) or let the account's webhook notify you, then call pinin_download_restoration for a signed link. Restoration takes seconds to a couple of minutes. Do not call pinin_restore_photo again to "retry" a slow job — that costs another credit. Pass an idempotency_key so a repeat submit returns the first job instead of charging twice. Use pinin_get_account before a large batch to read the plan, the batch cap and the credit balance.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
pinin_restore_photoA

Queue photographs for restoration — damage repair, colorization, deblurring, upscaling — on the account behind the key. Send one photo as a public https image_url (preferred) or as image_base64, or up to 100 with images. Costs one credit per image, charged when the job settles and refunded automatically if it fails. Returns the new job in pending and does not wait: read the result with pinin_get_restoration. Pass idempotency_key when a retry must not charge twice, and dry_run: true to price a request without spending. Not for reading, listing or cancelling existing jobs — those are pinin_get_restoration, pinin_list_restorations and pinin_cancel_restoration.

pinin_get_restorationA

Read one restoration by id: status (pending, processing, completed, failed), mode, credits charged, the failure detail when it failed, when the files expire, and signed image URLs plus a share link once it completes. Call it after pinin_restore_photo, waiting at least the retry_after seconds the response carries; to follow several jobs, sweep pinin_list_restorations with updated_since instead of polling each id. Read-only and free. An unchanged pending job may answer from its weak ETag without a body.

pinin_list_restorationsA

List the account's restorations, newest first, one page at a time, with has_more and the next_cursor / next_cursor_id pair for the following page. Filter by status or mode, or pass updated_since to collect every job that changed since the instant your poller last ran — that is the reconciliation sweep, and it replaces tracking ids. Use this instead of pinin_get_restoration when following more than one job; use pinin_get_restoration for the full document of a single id. Read-only and free.

pinin_download_restorationA

Get the signed URL for a finished photograph, valid about an hour, with expires_at so you know when it lapses. image: "restored" (default) is the repaired file; "original" is the file that was sent in. Call it only once a job is completed — a pending, processing or failed job has nothing to download, and re-reading a completed job already returns the same URLs. Read-only and free: it re-signs the link, not the credits, and does not touch the job.

pinin_cancel_restorationA

Cancel a restoration that has not started processing. A queued job has not been charged, so cancelling costs nothing and refunds nothing; once the pipeline has picked it up the call fails with too_late_to_cancel and the credit stands. Check pinin_get_restoration first when the state is unknown. Writes job state — with pinin_restore_photo it is the only tool that changes anything.

pinin_get_accountA

Read the account behind the key: plan tier and status, credit balance, batch cap, concurrency, the key's requests per minute, the monthly cap and spend so far, and how many keys are active. Read it before queueing a large batch to size the request, and after a plan or balance failure — it stays readable on an empty balance, so a blocked account can see why. Read-only and free. For per-day history use pinin_get_usage.

pinin_get_usageA

Read usage analytics for the last days: totals for requests, errors, restorations and credits; the current month's credits used and balance; a per-key breakdown; and a per-day series. Use it to explain a spend, a spike in errors or a quiet account; use pinin_get_account for the current limits and balance on their own. Read-only and free.

pinin_list_modesA

List the restoration modes available to this account, each with its id, display name, what it changes in the photograph and its credit cost. Read it before choosing mode for pinin_restore_photo, or to explain the options to a user in their own words. Takes no arguments, costs nothing and does not touch any job.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.6/5.0

Scored across 8 tools

Disambiguation5/5

Each tool targets a distinct action on a distinct resource: create (restore_photo), read one (get_restoration), read many (list_restorations), cancel, download, plus modes/account/usage metadata. The descriptions actively pre-empt confusion, e.g. restore_photo explicitly excludes reading/listing/cancelling, and list_restorations says when to prefer it over get_restoration. The only mild overlap — download_restoration versus the URLs returned by get_restoration on a completed job — is called out and resolved in the text.

Naming Consistency5/5

Every tool follows the same `pinin_` prefix plus a snake_case verb_noun pattern (get_restoration, list_restorations, cancel_restoration, download_restoration). Verbs are used consistently for their semantics: get for single reads, list for collections, cancel/download for the specific operation.

Tool Count5/5

Eight tools is well within the sweet spot and each one earns its place — the create/read/list/cancel/download core plus three small metadata reads. Nothing appears redundant or padded; no operation is split into near-duplicate variants.

Completeness4/5

The full job lifecycle is covered: discover modes, size the account, submit, poll or sweep, cancel before processing, and fetch results, with usage analytics for spend questions. Minor gaps remain — no way to delete or purge jobs, no callback/webhook push alternative to polling, and no explicit re-submit/retry helper for failed jobs. These are workarounds an agent can manage, not dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues