jamf-api-best-practices

jamf-api-best-practices is a cursor rule for Cursor from liquidz00/jamfmcp. It costs 11 tokens per session (692 once invoked), scanned A, original, Apache-2.0.

A set of rules for connecting Python software to Jamf, a device-management platform for Apple computers and mobile devices. It covers Jamf APIs, OpenAPI schemas, typed data models, authentication, pagination, rate limits, and errors.

In plain words
What is it for?
Use it when creating or maintaining Python integrations with Jamf Pro, including API calls, response models, pagination, and error handling.
Why use it?
API integrations can break when requests, responses, authentication, or failures are handled inconsistently. These rules encourage code that follows Jamf's documented interfaces and checks data clearly.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/liquidz00/jamfmcp/jamf-api-best-practices
Clone the repo
git clone --depth 1 https://github.com/liquidz00/jamfmcp

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jamf-api-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/rules/liquidz00/jamfmcp/jamf-api-best-practices.svg)](https://agentmods.dev/rules/liquidz00/jamfmcp/jamf-api-best-practices)
Your own site
<a href="https://agentmods.dev/rules/liquidz00/jamfmcp/jamf-api-best-practices"><img src="https://agentmods.dev/badge/rules/liquidz00/jamfmcp/jamf-api-best-practices.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 692 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00011 $0.00692
Opus 5 $0.00005 $0.00346
Sonnet 5 $0.00002 $0.00138
Haiku 4.5 $0.00001 $0.00069

Measured 3d ago against content hash 6d9b2151957b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

jamf-api-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/jamf-api-best-practices.mdc · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Jamf API Integration and AI-Compatible Development

Jamf API Best Practices

OpenAPI Schema Usage

  • Consult the official Jamf OpenAPI schema to understand expected request and response formats
  • Parse or reference field types and structures from the schema to validate payloads
  • Generate response models with Pydantic where possible to support explicit typing and schema validation

Error Handling

  • Catch only specific, expected exceptions:
    • requests.exceptions.HTTPError
    • requests.exceptions.ConnectionError
    • json.JSONDecodeError
    • Custom exceptions like JamfApiError
  • Avoid general except Exception blocks unless absolutely necessary
  • If a general exception is used:
    • Document the reasoning in a code comment
    • Log the full exception trace and request context
  • Never use bare except: blocks
  • Use structured logging for error traceability and AI observability

AI Integration & Tooling Compatibility

  • Write clear, composable functions with well-defined inputs and outputs
  • Avoid hidden state and side effects where possible
  • Use consistent naming conventions to help with code interpretation by LLMs and agents
  • Annotate interfaces with type hints and docstrings to improve discoverability
  • Design modules and utilities to be used independently or chained together as AI “playbooks”
  • Document each function’s purpose, expected input shape, and output format for downstream use

Observability and Logging

  • Use Python’s logging module with structured output (e.g., JSON or key-value logs)
  • Include contextual metadata in logs (e.g., API endpoint, serial number, device ID)
  • Avoid printing sensitive information (e.g., tokens, user emails)
  • Ensure logs can be parsed and analyzed by external tools or AI agents

Read the full file on GitHub · 68 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 68 lines · 11 tokens per session scan A 6d9b2151957b

Subscribe to this mod's changes

jamf-api-best-practices is a cursor rule published in the GitHub repository liquidz00/jamfmcp (8 stars, last pushed 12d ago), licensed Apache-2.0. It adds 11 tokens to every session and 692 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.