New Your team’s decisions, in one playbook every coding agent works from. Never answer your agent twice
Home / Token cost / Moodle

The Moodle MCP server costs 56,457 tokens before the first call.

Every request your agent makes carries every tool definition this server exposes — context your code, documents and conversation can't use, mostly for tools the agent never calls. You don't need them all in the window, and you don't have to pay for them.

QUICK ANSWER The Moodle MCP server's 233 tool definitions consume 56,457 tokens — 28% of a 200k context window, and 30× the median MCP server (1,862 tokens). A scoped grant exposing only the tools you use cuts that roughly in proportion.

MEASURED FROM SCHEMAS tiktoken o200k_base · rank #68 of 12,722 measured servers · refreshed every build Method →

What that costs before your agent starts working.

Tool definitions are overhead: they occupy context on every request and compete with your code, documents and conversation history for the same window.

200K WINDOW 28%
1M WINDOW 5.6%

Corpus context: Moodle ranks #68 of 12,722 measured MCP servers by definition cost. The median is 1,862 tokens, p90 is 13,674, and the heaviest (Ainumbers Mcp Apps) is 442,047 — 221% of a 200k window on its own. New to this? See MCP token cost and context window in the glossary.

Where the 56,457 tokens go.

Each row is one tool definition as a tools/list entry — name, description and input schema — counted with o200k_base. Average: 242 tokens per tool.

ToolCategoryTokens% of server
create_question Write 1,676 3.0%
update_question Write 1,521 2.7%
create_activity Write 1,132 2.0%
update_activity Write 1,123 2.0%
add_lesson_page Write 869 1.5%
edit_lesson_page Write 772 1.4%
add_database_field Write 723 1.3%
set_course_completion_criteria Write 698 1.2%
edit_database_field Write 683 1.2%
grade_submission Write 653 1.2%
edit_section Write 651 1.2%
set_badge_criteria Write 635 1.1%
add_feedback_item Write 578 1.0%
copy_between_sites Write 575 1.0%
edit_feedback_item Write 559 1.0%
auto_create_groups Write 554 1.0%
configure Write 507 0.9%
restore_course Write 470 0.8%
set_rubric Write 459 0.8%
import_grades Write 409 0.7%
reset_course Destructive 382 0.7%
get_course_logs Read 379 0.7%
set_enrolment_method Write 367 0.7%
backup_course Write 362 0.6%
create_wiki_page Write 345 0.6%
get_course_updates Read 343 0.6%
message_participants Write 343 0.6%
allocate_workshop_randomly Write 341 0.6%
create_discussion Write 341 0.6%
list_wiki_pages Read 340 0.6%
edit_glossary_entry Write 331 0.6%
assess_workshop_submission Read 327 0.6%
add_book_chapter Write 326 0.6%
reply_to_post Write 326 0.6%
get_submissions Read 324 0.6%
schedule_workshop_allocation Write 321 0.6%
list_glossary_entries Read 314 0.6%
allocate_workshop_reviewer Write 314 0.6%
set_grade Write 314 0.6%
add_glossary_entry Write 311 0.6%
get_course_completion_status Read 309 0.5%
remove_workshop_reviewer Destructive 307 0.5%
allocate_marker Write 307 0.5%
add_questions_to_quiz Write 305 0.5%
list_participants Read 303 0.5%
edit_database_entry Write 302 0.5%
assess_workshop_example Write 300 0.5%
set_group_members Write 300 0.5%
enrol_users Execute 290 0.5%
edit_activity Write 284 0.5%
answer_lesson_page Read 276 0.5%
update_course Write 275 0.5%
copy_course Write 273 0.5%
set_database_template Write 271 0.5%
set_quiz_override Write 270 0.5%
edit_quiz_slot Write 268 0.5%
edit_wiki_page Write 268 0.5%
save_workshop_submission Write 268 0.5%
edit_post Write 266 0.5%
override_workshop_grade Destructive 263 0.5%
get_quiz_statistics Read 263 0.5%
grant_extension Write 261 0.5%
open_scorm Write 260 0.5%
answer_quiz_questions Write 259 0.5%
add_database_entry Write 258 0.5%
edit_book_chapter Write 257 0.5%
export_grades Write 255 0.5%
set_workflow_state Write 253 0.4%
award_badge Write 251 0.4%
edit_workshop_example Write 251 0.4%
import_questions Write 251 0.4%
get_quiz_results Read 245 0.4%
list_database_entries Read 243 0.4%
add_workshop_example Write 238 0.4%
get_workshop_submission Read 235 0.4%
submit_survey Write 230 0.4%
list_discussions Read 229 0.4%
update_grade_category Write 228 0.4%
get_discussion Read 226 0.4%
add_grade_item Write 226 0.4%
get_conversation Read 222 0.4%
create_badge Write 222 0.4%
set_user_roles Write 222 0.4%
export_questions Write 221 0.4%
add_section Write 218 0.4%
edit_question_category Write 217 0.4%
export_database_entries Write 217 0.4%
set_quiz_pages Write 216 0.4%
update_event Write 216 0.4%
move_lesson_page Write 214 0.4%
list_questions Read 210 0.4%
add_site Write 209 0.4%
override_completion Write 209 0.4%
calculate_workshop_grades Write 206 0.4%
delete_question_category Destructive 205 0.4%
grade_forum_user Execute 205 0.4%
rate Execute 202 0.4%
validate_html Read 201 0.4%
grade_quiz_question Write 201 0.4%
update_grade_item Write 201 0.4%
import_activities Write 200 0.4%
move_questions Write 200 0.4%
get_activities_overview Read 199 0.4%
add_quiz_section Write 199 0.4%
get_participation_report Read 198 0.4%
list_notifications Read 198 0.4%
move_book_chapter Write 198 0.4%
get_survey_results Read 197 0.3%
import_glossary Write 197 0.3%
download_file Read 196 0.3%
create_event Write 196 0.3%
browser_snapshot Read 194 0.3%
get_course_structure Read 194 0.3%
get_activity_content Read 192 0.3%
get_wiki_page Read 192 0.3%
add_grade_category Write 192 0.3%
mark_course_complete Write 191 0.3%
browser_wait Execute 190 0.3%
import_database_entries Write 186 0.3%
set_book_chapter_visibility Write 186 0.3%
set_glossary_entry_approved Write 186 0.3%
send_message Write 182 0.3%
validate_gift Read 181 0.3%
unenrol_user Destructive 180 0.3%
apply_database_preset Write 178 0.3%
import_groups Write 178 0.3%
set_discussion_state Write 175 0.3%
list_deadlines Read 174 0.3%
get_lesson_pages Read 171 0.3%
answer_choice Write 171 0.3%
edit_scale Write 171 0.3%
delete_questions Destructive 170 0.3%
export_glossary Write 170 0.3%
set_grade_letters Write 170 0.3%
set_discussion_subscription Write 169 0.3%
remove_quiz_slot Destructive 168 0.3%
list_conversations Read 168 0.3%
delete_lesson_page Destructive 167 0.3%
list_book_chapters Read 166 0.3%
add_question_category Write 166 0.3%
move_feedback_item Write 166 0.3%
save_submission Write 166 0.3%
set_database_entry_approved Write 165 0.3%
browser_navigate Execute 162 0.3%
use_feedback_template Write 162 0.3%
delete_glossary_entry Destructive 161 0.3%
get_site_info Read 161 0.3%
get_survey Read 161 0.3%
update_group Write 161 0.3%
browser_click Write 160 0.3%
browser_upload Write 160 0.3%
create_group Write 160 0.3%
get_activity_settings Read 159 0.3%
get_database_templates Read 159 0.3%
delete_book_chapter Destructive 157 0.3%
get_feedback_items Read 156 0.3%
delete_database_entry Destructive 155 0.3%
submit_assignment Write 155 0.3%
set_workshop_phase Write 154 0.3%
duplicate_activity Write 153 0.3%
delete_database_field Destructive 152 0.3%
get_workshop Read 151 0.3%
add_scale Write 151 0.3%
delete_activity Destructive 150 0.3%
list_courses Read 149 0.3%
list_potential_users Read 149 0.3%
list_question_categories Read 149 0.3%
show_browser Read 149 0.3%
browser_type Write 149 0.3%
get_attempt_review Read 148 0.3%
get_scorm Read 147 0.3%
set_grouping_groups Write 147 0.3%
delete_feedback_item Destructive 146 0.3%
delete_section Destructive 146 0.3%
get_grader_report Read 146 0.3%
add_glossary_category Write 145 0.3%
get_forum_grades Read 144 0.3%
get_rubric Read 144 0.3%
get_completion_report Read 143 0.3%
set_completion Write 142 0.3%
get_activity_report Read 139 0.2%
browser_select Write 139 0.2%
save_feedback_template Write 139 0.2%
start_quiz_attempt Execute 138 0.2%
delete_workshop_example Destructive 137 0.2%
list_questions_to_grade Read 137 0.2%
delete_feedback_template Destructive 136 0.2%
get_course_completion_criteria Read 136 0.2%
get_workshop_allocation Read 135 0.2%
login Write 134 0.2%
get_quiz_info Read 133 0.2%
list_question_banks Read 133 0.2%
get_h5p_activity Read 131 0.2%
finish_quiz_attempt Read 130 0.2%
get_choice_results Read 130 0.2%
list_pending Read 130 0.2%
get_my_grades Read 129 0.2%
get_database_fields Read 128 0.2%
get_me Read 127 0.2%
set_badge_enabled Write 127 0.2%
get_lesson_page Read 126 0.2%
list_database_presets Read 125 0.2%
delete_grade_category Destructive 124 0.2%
list_enrolment_methods Read 124 0.2%
create_grouping Write 123 0.2%
get_choice Read 122 0.2%
use_site Write 121 0.2%
list_badges Read 120 0.2%
delete_grade_item Destructive 119 0.2%
get_assignment Read 118 0.2%
list_workshop_examples Read 117 0.2%
delete_post Destructive 114 0.2%
get_quiz_structure Read 114 0.2%
get_quiz_attempt Read 111 0.2%
list_assignments Read 111 0.2%
list_glossary_categories Read 110 0.2%
set_question_status Write 108 0.2%
delete_event Destructive 107 0.2%
remove_site Destructive 106 0.2%
get_gradebook_setup Read 103 0.2%
list_events Read 103 0.2%
delete_group Destructive 102 0.2%
list_feedback_templates Read 98 0.2%
delete_grouping Destructive 95 0.2%
list_groups Read 95 0.2%
list_groupings Read 91 0.2%
list_scales Read 89 0.2%
get_grade_letters Read 86 0.2%
list_sites Read 81 0.1%
logout Write 75 0.1%
get_event Read 74 0.1%
mark_notifications_read Write 63 0.1%
server_info Read 62 0.1%

Your agent uses a handful of these tools. It pays for all 233.

You don't need all 233 of those definitions in the window. PolicyLayer is an MCP gateway that sits in front of Moodle: only the tools you grant are exposed to the agent, the rest never load. A smaller window means a sharper agent — less noise when it picks a tool — and every request costs less:

Grant scopeDefinition costReduction
All 233 tools (no gateway) 56,457 tokens —
3 granted tools ~727 tokens −99%
5 granted tools ~1,212 tokens −98%
10 granted tools ~2,423 tokens −96%

The risk dividend: 24 of these 233 tools are critical-risk (destructive or financial) and cost 3,949 tokens (7% of the definition load). Block them — the recommended starter policy — and you reclaim that context before tuning anything else.

  1. Create a free account and register Moodle — nothing to install.
  2. Grant only the tools you use — ungranted definitions never enter the context window.
  3. Point your MCP client (Claude, Cursor, anything) at your gateway URL.
CUT MOODLE TOKEN COST →

Instant setup, no code required.

Moodle token-cost questions.

How many tokens does the Moodle MCP server use?+

Its 233 tool definitions total 56,457 tokens — 28% of a 200k context window — measured with tiktoken o200k_base over the serialised tools/list payload. Exact counts vary slightly by client and model.

Why does Moodle consume tokens before I send a message?+

MCP clients load every connected server's tool definitions — name, description, and input schema — into the model's context so it knows what it can call. That payload is charged against your context window on every request, whether or not a tool is used.

How do I reduce Moodle's token usage?+

Expose fewer tools. A PolicyLayer grant scopes Moodle to only the tools you allow — ungranted definitions are filtered out of the tool list, so they never enter the context window. A grant of 3 typical tools costs roughly 727 tokens, a 99% reduction.

Does deferred tool loading fix this?+

Partially, in some clients. Claude Code defers MCP tool schemas behind a tool-search step by default, and VS Code has experimental grouping — but you still pay tokens per search and reload, and Cursor, Windsurf and Gemini CLI load definitions upfront. Reducing the exposed tool set cuts the cost in every client.

How these numbers were measured.

01
Serialisation

Each tool is serialised as a tools/list entry — name, description, input schema — from the schemas in the PolicyLayer scan database. Clients differ slightly in framing, so treat counts as close estimates.

02
Tokeniser

tiktoken o200k_base (GPT-4o/o-series). Anthropic's current tokeniser isn't published, so Claude's exact counts will differ; for English text and JSON schemas the totals are close enough to treat these as estimates.

03
Deferred loading

Some clients now defer schema loading (Claude Code's tool search; VS Code experimental grouping). You still pay per search and reload — and Cursor, Windsurf and Gemini CLI load everything upfront.

Computed 20-10-2026 from the PolicyLayer scan database over all 233 catalogued Moodle tools. Counts refresh with every site build.

Expose only the tools you use — the rest never enter your context.

A PolicyLayer grant scopes Moodle to the tools you actually allow. Ungranted definitions never load, and every call that does run is checked against policy first.

Instant setup, no code required.

46,500+ MCP servers and 515,000+ tools scanned and risk-classified.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.