Skip to main content
Glama

Duo Data Utilities: IBAN, VAT, ISIN Validation API

Plus code (Open Location Code) encoder and decoder

plus_code_encode_decode
Read-onlyIdempotent

Plus code (Open Location Code) encoder and decoder: encode coordinates as a plus code at a chosen length, or decode a full code back to its bounding box and centre. Also shortens a full code against a reference coordinate and recovers a shortened code given a reference, which is how plus codes are normally exchanged in text. Returns code length, precision in metres and validity. Price: $0.05 per successful call, paid over x402 (USDC on Base).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "plus_code_encode_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
opNoencode (default), decode, shorten or recover. Accepted: encode, decode, shorten, recover.
latNoLatitude for op=encode. Accepted: a number between -90 and 90.
lonNoLongitude for op=encode. Accepted: a number between -180 and 180.
codeNoPlus code for decode, shorten or recover. Accepted: at most 20 characters.
lengthNoInteger code length for op=encode: one of 2,4,6,8,10 (default),11,12,13,14,15. Other integers in 2-15 are 400 UNSUPPORTED_VALUE. Accepted: one of 2,4,6,8,10,11,12,13,14,15.
ref_latNoReference latitude for op=shorten/recover. Accepted: a number between -90 and 90.
ref_lonNoReference longitude for op=shorten/recover. Accepted: a number between -180 and 180.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / lat / type
      Previous value: -"string"New value: +[
      +  "number",
      +  "string"
      +]
    • addedInput schema / properties / length / anyOf
      Added value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": -9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / length / type
      Removed value: -"string"
    • changedInput schema / properties / lon / type
      Previous value: -"string"New value: +[
      +  "number",
      +  "string"
      +]
    • changedInput schema / properties / ref_lat / type
      Previous value: -"string"New value: +[
      +  "number",
      +  "string"
      +]
    • changedInput schema / properties / ref_lon / type
      Previous value: -"string"New value: +[
      +  "number",
      +  "string"
      +]
  2. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and closed-world, so safety is covered. The description adds genuinely new behavior: it is a paid call ($0.05 per successful call via x402 / USDC on Base) and it states what is returned (length, precision in metres, validity). It does not mention rate limits or failure/refund behavior for unsuccessful calls.

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

Conciseness4/5

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

The operations are front-loaded and the shortening/recovery relationship and the pricing note each carry information the agent needs. It is a dense paragraph rather than broken-out points, and the payment sentence could be tightened, but nothing is clearly redundant.

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 seven optional parameters, four operation modes and no output schema, the description does the needed work by summarizing returned fields and explaining the shorten/recover pairing. It does not describe what an encode/decode result looks like beyond those fields (e.g., bounding box components), which is a minor gap for a tool with no output schema.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real semantics: 'at a chosen length' ties to the length parameter, and 'decode a full code back to its bounding box and centre' implies decode needs a full code, while shortened codes require the recover op with a reference coordinate. That op-to-parameter mapping is not spelled out in the schema.

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?

The description names a specific resource (plus code / Open Location Code) and enumerates the four operations it performs: encode, decode, shorten, recover. It is unambiguous what the tool does. It does not explicitly route against siblings such as geohash_encode_decode, relying on the format name to distinguish them.

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

Usage Guidelines4/5

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

Each operation is placed in a usage context: encode for coordinates at a chosen length, decode for a full code to a bounding box, and shorten/recover framed as 'how plus codes are normally exchanged in text', which tells the agent these are paired operations. There is no explicit when-not guidance or named alternative for coordinate-encoding tasks.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.