Skip to main content
Glama
aymandakirgh

pinterest-mcp

by aymandakirgh

Exchange an OAuth code for tokens

pinterest_exchange_oauth_code

Exchange the OAuth redirect code for Pinterest access and refresh tokens. Use it to complete authorization and securely store both tokens for API calls.

Instructions

Exchange the code from the OAuth redirect for an access token and refresh token. Access tokens last about 30 days; refresh tokens about a year. Store both securely.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe `code` query parameter from the redirect URL.
app_idNoFalls back to PINTEREST_APP_ID.
app_secretNoFalls back to PINTEREST_APP_SECRET.
redirect_uriNoMust be identical to the one used to build the authorization URL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare the write/idempotency profile, but the description adds genuinely new behavioral context: token lifetimes (~30 days vs ~1 year) and the instruction to store both securely. It still omits whether the code is single-use or what error conditions look like, so it stops short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with no padding, front-loading the core action before the token-lifetime detail. Every clause carries information the agent would otherwise lack.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description usefully names the return values (access and refresh tokens) plus their lifetimes, which is the key missing output information. It could go further on failure modes or re-use of the code, but it is solid for a simple four-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four parameters (including the app_id/app_secret fallbacks and the redirect_uri must-match constraint) are already documented in the schema itself. The description adds no syntax or format detail beyond restating that `code` comes from the redirect URL, matching the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (exchange) and resource (OAuth code → access/refresh tokens), which is clearly distinct from siblings like pinterest_build_oauth_url and pinterest_refresh_access_token. It does not explicitly name those siblings to draw the boundary, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Phrases like 'the code from the OAuth redirect' imply this is the step after the authorization redirect, which gives reasonable context. However, it never states the sequence relative to pinterest_build_oauth_url or when pinterest_refresh_access_token should be used instead, leaving the workflow to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.