Skip to main content
Glama
mcp-edf

mcp-edf

by mgcrea

EDF: Login

edf_auth_login
Idempotent

Sign in to EDF to authorize read-only electricity and gas consumption queries. Opens Safari on macOS to capture the login code, or accepts a redirect URL as a manual fallback.

Instructions

Sign in to EDF. On macOS this opens the EDF login in a Safari tab and catches the one-time code when EDF redirects back: if Safari is already signed in to EDF it completes in a second or two with nothing to do; otherwise Safari comes forward and the user logs in as usual. The first run triggers macOS's 'allow to control Safari' prompt. Waits up to wait_seconds, then keeps listening in the background for 5 minutes: call edf_auth_status afterwards. Elsewhere, pass redirect_url instead (see that argument). Logging in again replaces the stored login.

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": "edf_auth_login"
  }
}

Input Schema

NameRequiredDescriptionDefault
redirect_urlNoManual fallback, without Safari automation: the full address the browser landed on after logging in, https://suiviconso.edf.fr/openid?code=…&state=…. The Suivi Conso page uses and erases the code within a second, so it must be copied before the page loads (e.g. with JavaScript disabled). Leave unset for the automatic login.
wait_secondsNoHow long to wait for the login before returning. Defaults to 90 (MCP calls time out near 120).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, openWorldHint=true, idempotentHint=true and destructiveHint=false; the description adds platform-specific side effects the annotations cannot convey: a Safari tab opening, a macOS permission prompt on first run, a bounded wait followed by five minutes of background listening, and the fact that re-login overwrites the stored login (consistent with idempotentHint). It stops short of saying what a successful or failed return looks like, but it does say to check edf_auth_status afterwards, which covers most of that need.

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?

It is front-loaded with the action and modes, and nearly every clause carries information (mode split, timing, permission prompt, follow-up call, replacement caveat). It is dense as a single paragraph and the parenthetical "(see that argument)" is a minor pointer rather than content, but nothing is genuinely wasted.

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

Completeness5/5

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

For a two-parameter, no-output-schema auth tool, the description covers the platforms, the automated flow, the manual fallback, timing limits, first-run permission friction, and the required follow-up call. An agent has everything needed to decide to call it and to know what state the session is in afterwards.

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 consequence-level meaning: the wait_seconds value governs when the call returns, after which listening continues in the background for five minutes, and redirect_url is scoped as a non-macOS/manual fallback with a pointer to the caveat (the code is erased within a second). That is real behavior beyond the field descriptions.

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

Purpose5/5

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

The description opens with a specific verb and resource ("Sign in to EDF") and immediately frames the two operating modes: Safari automation on macOS and a manual redirect_url path elsewhere. It also names the follow-up sibling, edf_auth_status, so an agent can tell this apart from the related auth tools without inspecting schemas.

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

Usage Guidelines5/5

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

It says explicitly when this path is cheap ("if Safari is already signed in ... it completes in a second or two with nothing to do"), when to switch to redirect_url ("Elsewhere"), what to call afterwards ("call edf_auth_status afterwards"), and warns that re-running replaces the stored login. That is concrete when-to-use and after-use routing rather than an implied flow.

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