Skip to main content
Glama
mcp-edf

mcp-edf

by mgcrea

EDF: Login

edf_auth_login
Idempotent

Sign in to EDF to authenticate the read-only energy tools. On macOS it opens Safari and captures the one-time code automatically; otherwise pass the redirect URL to complete login.

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. An EDF login lasts 20 minutes; after that the server renews it silently through Safari while Safari stays signed in to EDF, so calling this again is only needed when a tool answers signedIn: false.

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.9/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the macOS Safari automation behavior, the one-time-code capture, the first-run macOS permission prompt, background listening after the wait, replacement of stored credentials, and the 20-minute session lifetime with silent renewal. Those are substantial operational details an agent needs before invoking an authentication mutation.

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?

The description is front-loaded with the core action and then proceeds through platform behavior, timing, fallback, credential replacement, and session lifetime. Despite its length, every sentence carries operationally relevant information and there is no filler.

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?

With no output schema, the description still covers what the tool does, how completion is detected, what the user may need to do, how to follow up, and how long the login remains valid. That is complete for a two-parameter authentication tool with an interactive browser flow.

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 already 100%, so both parameters are well documented structurally. The description adds useful behavioral meaning, especially that wait_seconds is followed by background listening and that redirect_url is a manual fallback for environments without Safari automation, though it does not expand on parameter formatting beyond the schema.

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 target, 'Sign in to EDF', and immediately distinguishes this authentication step from status checking and from routine data retrieval. It also names edf_auth_status as the required follow-up, so the agent can place the tool in the workflow without consulting siblings.

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 gives explicit usage conditions: use the Safari flow on macOS, use redirect_url elsewhere, wait up to wait_seconds, and call edf_auth_status afterward. It also states the key exclusion that calling login again is only needed when another tool reports signedIn: false, and explains the silent renewal that otherwise makes re-login unnecessary.

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