Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Get Login History

sf_get_login_history
Read-onlyIdempotent

Queries Salesforce LoginHistory for user login attempts, including IP, browser, status, and login type. Enables security monitoring and compliance auditing of access.

Instructions

Queries LoginHistory to see user login activity — who logged in, from where, and whether they succeeded.

Returns records with: loginTime, username, sourceIp, browser, platform, status, loginType

status values: 'Success', 'Failed', 'No Password', 'Blocked', 'No Cookie' loginType values: 'Application', 'API', 'SAML', 'OAuth', 'LightningLogin', 'Chatter'

Useful for:

  • Security monitoring (failed logins, unusual IP addresses)

  • Compliance auditing (who accessed the org and when)

  • Investigating suspicious account activity

Note: LoginHistory covers the past 6 months.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum records to return
statusNoFilter by login status, e.g. 'Success', 'Failed'
endDateNoEnd date in ISO format, e.g. '2025-12-31'
usernameNoFilter by Salesforce username
startDateNoStart date in ISO format, e.g. '2025-01-01'
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint true, and destructiveHint false. The description adds valuable context beyond these: the 6-month data retention window, the specific returned fields, and enumerated status/loginType values. It does not contradict annotations.

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 well-structured and front-loaded: first sentence states purpose, followed by return fields, enums, use-case bullets, and a note on data retention. Every sentence earns its place; no fluff or redundancy.

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?

Even without an output schema, the description adequately covers return fields and enum values. It also includes the 6-month retention limitation and typical use cases, making it sufficiently complete for a read-only query tool with good schema and annotations.

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% for all five parameters. The description enriches parameter understanding by listing all possible values for status (Success, Failed, etc.) and loginType (Application, API, etc.), which the schema only gives examples for. This adds meaning 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 clearly states it 'Queries LoginHistory' to reveal login activity, including who, from where, and success status. It lists specific return fields and enum values for status and loginType, making it distinct from other audit/history tools like get_setup_audit_trail or get_field_history.

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?

Provides a 'Useful for' list covering security monitoring, compliance auditing, and suspicious account investigation, clarifying when to use this tool. It does not explicitly name alternative tools or scenarios where it should not be used, but the context is clear enough.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/semwalajay83-sem/salesforce-metadata-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server